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: /load_content.jsp Sample code: index.jsp: main_content.jsp: images/Continue.jpg 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]
Re: Strtus 2.0.11 AJAX TabbedPanel with Remote tabs: How to load the result page in another tab
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 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: /load_content.jsp Sample code: index.jsp: executeScripts="true"> href="%{incUrl4}" executeScripts="true"/> main_content.jsp: images/Continue.jpg Any help or suggestion is appreciated. Thanks Manisha - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strtus 2.0.11 AJAX TabbedPanel with Remote tabs: How to load the result page in another tab
Hi Jeromy, That did not work. It still posting as a new page. One more thing is the tabbedPanel is already inside another tabbedpanel (2nd level nested). Will that cause this problem? thx Jeromy Evans - Blue Sky Minds wrote: > > 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 > > > executeScripts="true"> > >executeScripts="true"> > > > > > > > -- 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-tp16115694p16127001.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]
Re: Strtus 2.0.11 AJAX TabbedPanel with Remote tabs: How to load the result page in another tab
That means the form is not being submitted via ajax. The problem is not with the target, but rather the div that contains the form.. Make sure it was loaded with with separateSripts=false and executeScripts=true (and parseContent=true if in 2.1). You can definitely have one tab inside another and and nest as far as you like, but it seems to be a common problem that the scripts are not executed or the markup is not parsed by dojo. manisha5 wrote: Hi Jeromy, That did not work. It still posting as a new page. One more thing is the tabbedPanel is already inside another tabbedpanel (2nd level nested). Will that cause this problem? thx Jeromy Evans - Blue Sky Minds wrote: 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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strtus 2.0.11 AJAX TabbedPanel with Remote tabs: How to load the result page in another tab
Hi manisha5!.. look this: required="true" theme="ajax" disabled="false" selectedTab="%{pgNome}" cssStyle="height: 290px; font-family: Verdana; font-weight:bold; width:85%; align: rigth"> > refreshOnShow="true" cssStyle="display:none; font-weight: normal; padding: 10px; text-align: left; overflow:scroll;"> refreshOnShow="true" cssStyle="display:none; font-weight: normal; padding: 1px; text-align: left; overflow:scroll;"> 1 - create a id different for each div. (here it is: first, second and three) 2 - in 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: path for tabbedPanel' page I hope help you. ----- Original Message - From: "manisha5" <[EMAIL PROTECTED]> To: 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: /load_content.jsp Sample code: index.jsp: main_content.jsp: images/Continue.jpg 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]
Re: Strtus 2.0.11 AJAX TabbedPanel with Remote tabs: How to load the result page in another tab
I found the problem. Its working for me now. The tag did not have theme="ajax". After adding ajax theme, the result page was loaded in correct tab. Thanks for the help everyone. -- 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-tp16115694p16142680.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]