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:labelScegli 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Woody tab state control
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 2.1.4: wi:group wi:styling type=tabs/ wi:labelScegli una scheda:/wi:label wi:state wt:widget id=tab-state/ /wi: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 (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? 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/ /wd:field 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. Ugo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Woody tab state control
Il giorno 12/apr/04, alle 07:05, Steve Steinitz ha scritto: We attempted to control the tab selection of a tab group as follows: snip/ Binding is made against the form model, not the data passed to the view as the value of the bizData argument. Try: form.getWidget(tabState).value = 2; if you want to set it programmatically. Ugo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Woody tab state control
Hi Ugo, Thanks for your help. Ugo Cei wrote: We attempted to control the tab selection of a tab group as follows: snip/ Binding is made against the form model, not the data passed to the view as the value of the bizData argument. Try: form.getWidget(tabState).value = 2; if you want to set it programmatically. 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 ... 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(); Still, this has no effect on the selected tab. Should it work? 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? Thanks again for your time, Steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Woody tab state control
Hello, We attempted to control the tab selection of a tab group as follows: the tab group contains wi:group wi:styling type = tabs/ wi:state wt:widget id=tab-state/ /wi:state ... Our bindings include: wb:value id=tab-state path=tabState/ which refers to a value passed in from flow as follows var tabState = new java.lang.Integer(2); // for testing var bizData = {tabState: tabState}; This all has no effect -- it still shows the first tab. Ideas. Thanks, Steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]