I have noticed  the static way of defining a Dojo
TabContainer 
in a Tapestry page html template does not work.

<div id="testTabContainer" dojoType="TabContainer"
style="width: 100%; height: 20em;" >
        
        <div id="tab1" dojoType="ContentPane"  label="Tab
One">
                This is a piece of static content.

        </div>
        
        <div id="tab2" dojoType="ContentPane"  label="Tab
Two">This is tab2</div>
</div>

However it works when the TabContainer widget is
created dynamically.
Eg :
  
<div id="testTabContainer" >
        
        <div id="tab1"  label="Tab One">
                This is a piece of static content.

        </div>
        
        <div id="tab2" >This is tab2</div>
</div>



  var containernode=dojo.byId("testTabContainer");
    // Could have used
tapestry.widget.synchronizeWidgetState to create
widget
     var tabContainer =
dojo.widget.createWidget("TabContainer",
{id:"testTabContainer",style:"height:20em"},
containernode);
             var param;
             // Create contentPane for tab1
             var tab1 =
dojo.widget.createWidget("ContentPane", {label:"Tab
One"},dojo.byId("tab1"));             
             tabContainer.addChild(tab1);

           // Create contentPane for tab1
             var tab2 =
dojo.widget.createWidget("ContentPane", {label:"Tab
Two"},dojo.byId("tab2"));             
             tabContainer.addChild(tab2);

             tabContainer.select(tab1);


It would be appreciated if someone can explain why
doesn't the static way work ?

Shing 

Home page :
  http://uk.geocities.com/matmsh/index.html


                
___________________________________________________________ 
The all-new Yahoo! Mail goes wherever you go - free your email address from 
your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to