Hi, Kirk and everyone.

This one is a little tough to explain so please bear with me.

Like DemoApp, I have a header and leftnav, with Header importing LeftNav.  
Header.iwa looks like:

  import 'LeftNav'
  class Header < Iowa::Component
    attr_binding :user, :ulevel
    # stuff gone
  end

  <?
    leftnav {
        user = user
        ulevel = ulevel
    }
  ?>


LeftNav.iwa like:

  class LeftNav < Iowa::Component
    attr_binding :user, :ulevel

    def foo_page
        newPage = page_named("Run::Foo")
        newPage.user = @user
    	  newPage.ulevel = @ulevel
        yield newPage
    end
  end

  <?
    header {
        user = user
        ulevel = ulevel
    }
  ?>

LeftNav.html looks like:

  <div id="pagebody">
    <div id="menu">
        <ul>
            <li>Login</li>
            <li><a oid="foo_page">Foo</a></li>
        </ul>
        user='@user'
        level='@ulevel'
    </div>
 </div>

The main page (Index.html) has a login form from which I extract user and 
ulevel (user access level).  

So, when I login I go to page Bar which is generated from the Login 
button on the main form (Index.iwa) like:

    def goLogin
        check_login_details  # form validation .. errors into @errlist
        if @errlist.empty?
            # Now go into the application itself
            newPage = page_named('Run::Main')
            @ulevel = $hcSecurity.userGroup(@username)
            newPage.user = CGI::escapeHTML(@username)
            newPage.ulevel = @ulevel
            yield newPage
        end
    end

Which works fine.  Run::Main has the correct username and ulevel.  [As an 
aside, I noted that CGI::escapeHTML(@username) wiped @username.  Is this 
expected behanviour?]

However, if I click on the LeftNav foo link, the username and ulevel are 
both blank (empty strings).  Obviously, I am not getting the bindings 
right somewhere.

Main.iwa is very simple and looks like:

  import 'Header'
  import 'Footer'

  class Main < Iowa::Component

    attr_accessor :header, :user, :ulevel

    def run_single
        new_page = page_named("Run::SingleCmd")
        yield new_page
    end
  end

  <?
    header {
        user = user
        ulevel = ulevel
    }
  ?>

This make any sense?

Also, I notice that there is an 'attr_binding' attribute.  Can you 
explain that one to me?

Regards,

-- 
-mark.  (probertm @ acm dot org)