Put a div inside tab2 and make that inner div the target.
If you target the tab you're trying overwrite the markup for the tab
widget. By targeting a div inside the tab you can replace just the
content of tab.
You may also prefer to make the inner div a remote div and the tab
non-ajax because you get better control.
ie. in the jsp below, the target is a div inside the second tab
<s:tabbedPanel id="incorpContainer">
<s:div theme="ajax" id="dInc1" label="Company" href="%{incUrl1}"
executeScripts="true"></s:div>
<s:div id="dInc2" label="Employee">
<s:div theme="ajax" id="theTarget" href="%{incUrl2}"
executeScripts="true"></div>
</s:div>
manisha5 wrote:
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]