Hi manisha5!..

look this:

----------------------------------------------------------------

<s:tabbedPanel id="TabsEdit" doLayout="true" name="TabsEdit" required="true" theme="ajax" disabled="false" selectedTab="%{pgNome}" cssStyle="height: 290px; font-family: Verdana; font-weight:bold; width:85%; align: rigth">

<s:div id="first" label="---" theme = "ajax" cssStyle="display:none;

font-weight: normal; padding: 10px; text-align: left; overflow:scroll;" ></s:div>


<s:div id="second" label="Pessoa" theme = "ajax" href="edit_People.action" refreshOnShow="true" cssStyle="display:none;

font-weight: normal; padding: 10px; text-align: left; overflow:scroll;"></s:div>

<s:div id="three" label="Setor" theme = "ajax" href="edit_Setor.action" refreshOnShow="true" cssStyle="display:none;

font-weight: normal; padding: 1px; text-align: left; overflow:scroll;"></s:div>

</s:tabbedPanel>

1 - create a id different for each div. (here it is: first, second and three)
2 - in <s:tabbedPanel line, use selectedTab tag:  selectedTab="%{pgName}"
3 - in active action bean, create a variable pgName, with get and set methods. 4 - when you wish load first div, set pgName with "first" and put in session:

For first div:
String pgName = "first";
session.setAtribute("pgName", pgName);
return "myDiv";

For second div:
String pgName = "second";
session.setAtribute("pgName", pgName);
return "myDiv";

For three div:
String pgName = "three";
session.setAtribute("pgName", pgName);
return "myDiv";


in struts.xml action:
<result name="myDiv">path for tabbedPanel'  page</result>

I hope help you.


----- Original Message ----- From: "manisha5" <[EMAIL PROTECTED]>
To: <user@struts.apache.org>
Sent: Tuesday, March 18, 2008 4:32 AM
Subject: Strtus 2.0.11 AJAX TabbedPanel with Remote tabs: How to load the result page in another tab


Hi,
I just started working on Struts 2 + Ajax. I am stuck on one problem. Can
somebody help me?

I have main page which has tabbedPanel with 3 remote tabs.
When i click submit in remote page in tab1, i want to load result page in
tab2.

I gave tab2 div id as target for the submit but the page does not load
inside tabbedPanel.


Struts.xml snippet:

       <action name="continue" class="com.foo.action.ContinueAction">
           <result name="success">/load_content.jsp</result>
       </action>

Sample code:

index.jsp:

<s:url id="incUrl4" value="/corpinfo_content.jsp"/>
<s:url id="incUrl2" value="/AjaxTest.action" />
<s:url id="incUrl1" value="/main_content.jsp" />


    <s:tabbedPanel id="incorpContainer">
       <s:div theme="ajax" id="dInc1" label="Company" href="%{incUrl1}"
executeScripts="true"></s:div>
       <s:div theme="ajax" id="dInc2" label="Employee" href="%{incUrl2}"
executeScripts="true"></s:div>
       <s:div theme="ajax" id="dInc4" label="Corporate Info"
href="%{incUrl4}" executeScripts="true"/>
     </s:tabbedPanel>

main_content.jsp:

               <s:url id="continueAct" value="Continue.action"></s:url>
               <s:a href="%{continueAct}" targets="dInc2" >
                  images/Continue.jpg </s:a>


Any help or suggestion is appreciated.
Thanks
Manisha
--
View this message in context: http://www.nabble.com/Strtus-2.0.11-AJAX-TabbedPanel-with-Remote-tabs%3A-How-to-load-the-result-page-in-another-tab-tp16115694p16115694.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



__________ Informação do NOD32 IMON 2954 (20080318) __________

Esta mensagem foi verificada pelo NOD32 sistema antivírus
http://www.eset.com.br




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to