You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Steve Steinitz <st...@datatactics.com.au> on 2004/06/10 01:08:36 UTC

Re: Woody tab state control

Hello List,

On Tuesday, 13 April 2004 at 9:30am, Ugo Cei wrote:

>> 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 
>2.1.4:
>
>               <wi:group>
>                 <wi:styling type="tabs"/>
>                 <wi:label>Scegli una scheda:</wi:label>
>                 <wi:state>
>                   <wt:widget id="tab-state"/>
>                 </wi:state>
>
>> the flow does:
>> 
>>     var tabState = 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 (cocoon.request.tab != undefined) {
>   form.getWidget().getWidget("tab-state").setValue(cocoon.request.tab);
>}
>
>> Still, this has no effect on the selected tab.  Should it work? 

we, like Ugo, have this in the form definition file:

     <wd:field id="tab-state">
       <wd:datatype base="string"/>
    </wd:field>

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

It -still- doesn't work for us in 2.1.4.  Any ideas?

As a side issue, I also noticed that calls to

    form.getWidget().getWidget("tab-state").getValue();
    
return null at various places in our flowscript, like after
form.save.  Ugo, when do you save your current tab state?

We have spent many hours, on and off, trying to get this to work.
Our site is heavily tabbed and is sort of a mess without this
feature.  If anyone has any ideas at all, we're all ears.

Thanks,

Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org