It seems that this problem is caused by scripts not being executed when the
content of the tab is loaded. Here is the example.

Main tab has 3 other sub tabs A1, A2, A3. Each sub tab (lets say A1) has its
own tabbed panel with additional tabs (A11, A12, A13). Main tabbed panel
element is defined as follows:

<s:tabbedpanel id="X" doLayout="true" selectedTab="A1">
 <sx:div id="A1" theme="ajax" labelposition="top"
executeScripts="true"></sx:div>
</s:tabbedpanel>

When A1 is selected event is sent to X-selectChild topic. That event is
handled by a function that executes following:

dojo.widget.byId(A1).href = <some url>;
dojo.widget.byId(A1).cacheContent = false;
dojo.widget.byId(A1).refresh()

The content of the A1 is provided by jsp which defines script element
similar to the following:

dojo.addOnLoad(subscribeToNavigationEvents)

subscribeToNavigationEvents() function is responsible for subscribing onto
the <A1 tabbed panel>-selectChild topic and providing handler that does some
processing when any of the A11, A12 and A13 are selected.

Turns out the dojo.addOnLoad(subscribeToNavigationEvents) is never executed
when the content of the tab A1 is loaded and the event handler is not
registered. It works fine in Struts 2.0.14 however. I would appreciate any
help.

Regards,
Andrzej



On Tue, Jun 21, 2011 at 2:34 PM, Andrzej Adamczyk <vaterm...@gmail.com>wrote:

> Hello
>
> I am working on POC migrating application from Struts 2.0.14 to Struts
> 2.2.3 with DOJO 2.2.3 plugin. On the way DOJO framework will be updated from
> version 0.4.0 to 0.4.3.
>
> Application has main tabbed panel with few tabs, each containing another
> tabbed panel with few sub tabs. Upon hitting main tabs or any sub tabs a
> function is executed that sets some form elements etc. This function is
> fired by events passed to <tabbed panel>-selectChild topic upon selecting
> any tab within main or sub tabbed panel. The problem is that after moving to
> struts 2.2.3 the event is generated for main tabbed panel but it seems it is
> not generated for tabbed panel that exist within tab of the main tabbed
> panel. I tried to specify afterSelectTabNotifyTopic attribute on tabbed
> panel but it did not work either. Did anyone encounter such problem or has
> any tips on what could be the culprit? I would appreciate any help.
>
> Regards,
> Andrzej

Reply via email to