You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jason Wyatt <jw...@itree.com.au> on 2007/05/14 06:47:26 UTC

[S2] How to refresh "remote" tabbedpanels on user entry?

The docs for tabbedpanel at
<http://struts.apache.org/2.x/docs/tabbedpanel.html>
http://struts.apache.org/2.x/docs/tabbedpanel.html mention: 

"The tabbedpanel widget is primarily an AJAX component, where each tab can
either be local content or remote content (refreshed each time the user
selects that tab)."

Does the part about refreshing work? So far my experience has been that
tabbedpanel seems to refresh ALL remote tabs as soon as the user views the
tabbedpanel (ie, all the tab-related Actions are hit). It would be a nice
option to only refresh a tab when the user clicks on that tab.

Our tabbedpanel code:

<s:tabbedPanel selectedTab="%{currentTab}" id="NcrTabbedPanel" theme="ajax"
requiredposition="left" cssStyle="width: 770px; height: 465px;"
doLayout="true">

  <s:div label="Summary" id="Summary"
href="NcrSummaryAction.do?ncrId=%{ncrId}" theme="ajax"><p>Loading...</s:div>

  <s:div label="Detail" id="Detail" href="NcrDetailAction.do?ncrId=%{ncrId}"
theme="ajax"><p>&nbsp;</s:div>

  <s:div label="Comments" id="Comments"
href="NcrCommentAction.do?ncrId=%{ncrId}" theme="ajax"><p>&nbsp;</s:div>

  <s:div label="STC Sightings" id="STC Sightings"
href="NcrStcSightingSearchAction.do?ncrId=%{ncrId}"
theme="ajax"><p>&nbsp;</s:div>

  <s:div label="Static Weigh" id="Static Weigh"
href="NcrStaticWeighAction.do?ncrId=%{ncrId}" theme="ajax"><p>&nbsp</s:div>

</s:tabbedPanel>

Thanks for any help, regards

Jason

-----
Falun Dafa  Truth - Compassion - Forbearance

A mind & body practice under persecution in China

 <http://www.faluninfo.net/> http://www.faluninfo.net


Re: [S2] How to refresh "remote" tabbedpanels on user entry?

Posted by Musachy Barroso <mu...@gmail.com>.
A "preload" attribute was added to fix this. It won't me available until 2.1

https://issues.apache.org/struts/browse/WW-1860

regards
musachy

On 5/14/07, Jason Wyatt <jw...@itree.com.au> wrote:
>
> The docs for tabbedpanel at
> <http://struts.apache.org/2.x/docs/tabbedpanel.html>
> http://struts.apache.org/2.x/docs/tabbedpanel.html mention:
>
> "The tabbedpanel widget is primarily an AJAX component, where each tab can
> either be local content or remote content (refreshed each time the user
> selects that tab)."
>
> Does the part about refreshing work? So far my experience has been that
> tabbedpanel seems to refresh ALL remote tabs as soon as the user views the
> tabbedpanel (ie, all the tab-related Actions are hit). It would be a nice
> option to only refresh a tab when the user clicks on that tab.
>
> Our tabbedpanel code:
>
> <s:tabbedPanel selectedTab="%{currentTab}" id="NcrTabbedPanel"
> theme="ajax"
> requiredposition="left" cssStyle="width: 770px; height: 465px;"
> doLayout="true">
>
>   <s:div label="Summary" id="Summary"
> href="NcrSummaryAction.do?ncrId=%{ncrId}"
> theme="ajax"><p>Loading...</s:div>
>
>   <s:div label="Detail" id="Detail" href="NcrDetailAction.do
> ?ncrId=%{ncrId}"
> theme="ajax"><p>&nbsp;</s:div>
>
>   <s:div label="Comments" id="Comments"
> href="NcrCommentAction.do?ncrId=%{ncrId}" theme="ajax"><p>&nbsp;</s:div>
>
>   <s:div label="STC Sightings" id="STC Sightings"
> href="NcrStcSightingSearchAction.do?ncrId=%{ncrId}"
> theme="ajax"><p>&nbsp;</s:div>
>
>   <s:div label="Static Weigh" id="Static Weigh"
> href="NcrStaticWeighAction.do?ncrId=%{ncrId}"
> theme="ajax"><p>&nbsp</s:div>
>
> </s:tabbedPanel>
>
> Thanks for any help, regards
>
> Jason
>
> -----
> Falun Dafa  Truth - Compassion - Forbearance
>
> A mind & body practice under persecution in China
>
> <http://www.faluninfo.net/> http://www.faluninfo.net
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd