It has definitely solved a big problem. Now, i can show the correct data of
two tabs, submit them and have correct results. Actually, my case is very
simple, as i told you that the two tabs will not be related, so, each tab
will be submitted independently without needing each others data because
there is no common data. So, everything is fine. EXCEPT.....

If i submit one tab the page submits and as a result of this the other tabs'
data is lost. By lost i mean that the changes i made in other tabs are reset
because the page is submitted. I am still unable to find out how to make
each tab ajax based. Here is my jsp code. 


<s:url var="test1" value="demo/DefaultAllowanceDetailsAction.action"/>
<s:url var="test2" value="demo/LibraryFormDefaultAction.action"/>

<sx:tabbedpanel id="tabbedPanel" useSelectedTabCookie="true">
  <sx:div id="div1" label="Allowance Details" href="%{test1}"
refreshOnShow="false" preload="true">
    <s:action name="demo/DefaultAllowanceDetailsAction.action"
executeResult="true" />
  </sx:div>

  <sx:div id="div2" label="Library Form" href="%{test2}"
refreshOnShow="false" preload="true">
    <s:action name="demo/LibraryFormDefaultAction.action"
executeResult="true" />
  </sx:div >
</sx:tabbedpanel>

I have put false in refreshOnShow attribute so the tab is not refreshed once
it gets selected. What i want is to maintain the history of the changes made
to other tabs which were not submitted.

Thanks,

Shoaib Ahmad Gauhar


Shoaib Gauhar wrote:
> 
> Hello,
> 
> Here is the scenrio. I have two action classes. ClassA and ClassB. There
> is no relationship among these classes. You might say that if there is no
> relationship then why i have to put them in one single jsp. Well its a
> client's requirement.
> 
> In a single jsp there are two tabs. Tab1ForClassA and Tab2ForClassB.
> 
> Each tab has fields concerned to their classes as defined above. Tab1 ->
> ClassA and Tab2 -> ClassB.
> 
> Can we do it? I have tried this but what happens is that when i submit the
> data on Tab1, Tab2's data becomes empty.
> 
> So, any ideas will be highly appreciated. Furthermore, i am quite new to
> tabbed panel and would require clear tips and ideas.
> 
> Thanks in advance,
> 
> Shoaib Ahmad Gauhar
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-2.1-TabbedPanel-scenario-tp16446729p16491420.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]

Reply via email to