cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <>
Subject Re: Woody tab state control
Date Tue, 13 Apr 2004 07:30:23 GMT
Steve Steinitz wrote:
> Yes, we need to set it programmatically so we can keep the tab
> state when returning from another page.  Using your idea we still
> have:
> <wi:group>
>     <wi:styling type = "tabs"/>
>         <wi:state>
>             <wt:widget id="tab-state"/>
>         </wi:state>
>     ...

Should work. Here is a snippet from an application in production using 

                 <wi:styling type="tabs"/>
                 <wi:label>Scegli una scheda:</wi:label>
                   <wt:widget id="tab-state"/>

> But now, our bindings no longer include a tab-state binding. 
> Instead, per your idea, the flow does:
>     var tabState = new java.lang.Integer(2); // for testing
>     form.getWidget("tab-state".value = tabState;
>     form.showForm();

And this is the flowscript part. In my case, the selected tab is 
requested in the HTTP query string:

if ( != undefined) {

> Still, this has no effect on the selected tab.  Should it work? 

It should work, as long as you also put something like the following in 
your form definition file:
     <wd:field id="tab-state">
       <wd:datatype base="string"/>

With these three snippets, everything works, at least with 2.1.4.

> Moreover, isn't your method just another way to do a binding and
> therefore more or less the same as what we were originally doing?

No, you were originally passing the index of the current tab via the 
bizData argument to showForm. This has nothing to do with binding.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message