All this theoretical discussion aside, what I am trying to do is this --
create a tabbed menu - should have mentioned that earlier, sorry...I thought
I was simplifying the discussion, but it got carried off on a different path

Specifically,  http://unraveled.com/publications/css_tabs/ CSS Tabs 2.0 

We would all agree that the menu should be a component, say, Layout.tml: 


 <body id="tab${tabId}">
    
     <ul id="tabnav">
     
          <li class="tab0"> index?tabId=0 Home </li>
          <li class="tab1"> tab1?tabId=1 Table1 </li>
          <li class="tab2"> tab2?tabId=2 Table2 </li>

          [..and so on.. ]

     
     </ul>
    
     <t:body/>
    
    </body>


I was struggling with where to put the tabId(X) that needs to be passed from
page(X) to activate body id and class tab(X).   Dilemma: Should the ids be
properties of each of the pages?  They would then pass it to the layout
component somehow.  Either by setting the component parameter tabId from
each page class or by have component read the tabId (impossible) - either
way plenty of code.  Now I am just passing it as a request parameter - for
each tab.  All my tabX classes are empty shells.  I just need to receive it
in the component as request parameter.  The Laoyout.tml code is very
readable as well.  

I am not sure what the "Environment" solution referred really is.  If you
have an example (and time!), I will be happy to consider.  Even a whole new
way to do tabs perhaps?  But not urgent...as I said...I have found a way (or
a hack? Eye of the beholder ;-)).  

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Can-Component-Template-be-Informed-by-Page-Class-tp5681397p5681966.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to