Re: Struts Bridge - ActionRequest Related Question
Thanks a lot Ate especially for such a quick response on Sunday !!! I think I understand my problem now. Thanks again, Amit Original Message Follows From: Ate Douma <[EMAIL PROTECTED]> Reply-To: "Jetspeed Users List" To: Jetspeed Users List Subject: Re: Struts Bridge - ActionRequest Related Question Date: Sun, 10 Apr 2005 21:34:49 +0200 Shah Amit wrote: ... ViewPage /r5prAction.do?dispatch=loadDropDowns ... This is ok. location=''; location=location+"?dispatch=loadSecondDropdown" This is not ok! You *must* encode the dispatch=loadSecondDropdown parameter using the html:rewrite tag itself, *not* append it yourself. Remember, the Struts Bridge versions of the html tags are created to deliver a PortletURL. A PortletURL cannot be treated like a normal url as it (can) encode much more than parameters for just your request, it might also need to encode the state of other portlets on the same page. Your postfixed parameter won't be recognized and thus not remembered by the portal, hence the error message. Check the Struts documentation for the html:rewrite tag: http://struts.apache.org/userGuide/struts-html.html#rewrite You'll find out its easy to embed your parameters using the paramId and paramName (and possibly paramProperty) attributes. Now all of this works fine for the first time. I am able to click on the link from the menu-navigation system and come to this page, and then the dropdowns behave properly. But the thing is, once I fire an OnChange on any of the dropdowns, if I try to click on the maximize, minize buttons of the portlet, or even try to re-enter the portlet with the link from the menu-navigation system, I get the following error -- Request[/r5prAction.do] does not contain handler parameter named 'dispatch'. I guess something is happening and I am loosing the "dispatch" parameter. But the thing is, as long as I haven't fired the onChange of the dropdown, meaning - as long as the window.top.location has not been called, I can click on maximize, minimize buttons and everything else works great. Its only that once I fire the window.top.location, I start getting this error. And after that, I have to logout and log back in. I tried everything I can, but I can't figure out why this is happening. The problem is I want to use DispatchAction so that I dont have to write lot of classes for the same jsp. Also very sorry for such a long email. Please help Thanks, Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Bridge - ActionRequest Related Question
Shah Amit wrote: ... ViewPage /r5prAction.do?dispatch=loadDropDowns ... This is ok. location=''; location=location+"?dispatch=loadSecondDropdown" This is not ok! You *must* encode the dispatch=loadSecondDropdown parameter using the html:rewrite tag itself, *not* append it yourself. Remember, the Struts Bridge versions of the html tags are created to deliver a PortletURL. A PortletURL cannot be treated like a normal url as it (can) encode much more than parameters for just your request, it might also need to encode the state of other portlets on the same page. Your postfixed parameter won't be recognized and thus not remembered by the portal, hence the error message. Check the Struts documentation for the html:rewrite tag: http://struts.apache.org/userGuide/struts-html.html#rewrite You'll find out its easy to embed your parameters using the paramId and paramName (and possibly paramProperty) attributes. Now all of this works fine for the first time. I am able to click on the link from the menu-navigation system and come to this page, and then the dropdowns behave properly. But the thing is, once I fire an OnChange on any of the dropdowns, if I try to click on the maximize, minize buttons of the portlet, or even try to re-enter the portlet with the link from the menu-navigation system, I get the following error -- Request[/r5prAction.do] does not contain handler parameter named 'dispatch'. I guess something is happening and I am loosing the "dispatch" parameter. But the thing is, as long as I haven't fired the onChange of the dropdown, meaning - as long as the window.top.location has not been called, I can click on maximize, minimize buttons and everything else works great. Its only that once I fire the window.top.location, I start getting this error. And after that, I have to logout and log back in. I tried everything I can, but I can't figure out why this is happening. The problem is I want to use DispatchAction so that I dont have to write lot of classes for the same jsp. Also very sorry for such a long email. Please help Thanks, Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Bridge - ActionRequest Related Question
Hi Ate, Sorry to bring up this thread again. The solution that you mentioned - using window.top.location with did work well for me. However it created another problem. To summarize the situation, since it has been long since we discussed this thread - I have a jsp with 3 dropdowns. OnChange of first dropdown, second should load. OnChange of second, third should load, and onChange of third, a table should load on the page. I am using J2-SturtsBridge and DispatchAction. Since I only want to have one action for everything that this JSP does, and it is a dispatchAction, I have following in my portlet.xml. ... ViewPage /r5prAction.do?dispatch=loadDropDowns ... First of all, I dont know if this is valid at all !! And then on the OnChange of my dropdowns, I do window.top.location="SomeThing" and the SomeThing is derived by - location=''; location=location+"?dispatch=loadSecondDropdown" Now all of this works fine for the first time. I am able to click on the link from the menu-navigation system and come to this page, and then the dropdowns behave properly. But the thing is, once I fire an OnChange on any of the dropdowns, if I try to click on the maximize, minize buttons of the portlet, or even try to re-enter the portlet with the link from the menu-navigation system, I get the following error -- Request[/r5prAction.do] does not contain handler parameter named 'dispatch'. I guess something is happening and I am loosing the "dispatch" parameter. But the thing is, as long as I haven't fired the onChange of the dropdown, meaning - as long as the window.top.location has not been called, I can click on maximize, minimize buttons and everything else works great. Its only that once I fire the window.top.location, I start getting this error. And after that, I have to logout and log back in. I tried everything I can, but I can't figure out why this is happening. The problem is I want to use DispatchAction so that I dont have to write lot of classes for the same jsp. Also very sorry for such a long email. Please help Thanks, Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Bridge - ActionRequest Related Question
Thanks a lot !! That definately answers my question. I actually didn't even know about window.top.location :-( Sorry for my stupid questions. Thanks, Amit Original Message Follows From: Ate Douma <[EMAIL PROTECTED]> Reply-To: "Jetspeed Users List" To: Jetspeed Users List Subject: Re: Struts Bridge - ActionRequest Related Question Date: Fri, 01 Apr 2005 17:14:38 +0200 Shah Amit wrote: Hi Ate, Thanks a lot for the quick reply. I am "submitting" a form with and here is the action mapping type="com.company.struts.actions.ViewerActions" name="viewerForm" scope="request" validate="false" parameter="dispatch"> So probably my question would be is it possible to submit a form to a render URL at all ... I guess No ?? ... So in that case, I will have to use a dummy action with redirect="true" ?? .. You should not "POST" a form to a render URL. Encode your parameter(s) in a renderURL (for example using the Struts Bridge RewriteTag) and just point your browser url to it (setting window.top.location). Thanks, Amit Original Message Follows From: Ate Douma <[EMAIL PROTECTED]> Reply-To: "Jetspeed Users List" To: Jetspeed Users List Subject: Re: Struts Bridge - ActionRequest Related Question Date: Fri, 01 Apr 2005 16:56:58 +0200 You *must* be using action URLs because this warning is *only* displayed from within processAction handling. Just make sure to use render URLs. Shah Amit wrote: Hi all, Please pardon my stupidity with the Struts bridge. I have read the documentation several times, and I understand what it says. However I have a little bit trouble visualizing it in my scenerio. I have a page with 3 dropdowns. Each dropdown has an onChange="submit" thing and the secod dropdown is loaded based on value of first, third is loaded based on second. And then there is a table on the page that is loaded based on the selection of third dropdown. I am using DispatchAction so that I have only one Action Class per page. Now this is an all display only page and actually the "state" is not being changed at all I think. In this case, for each form submission from the dropdowns, I am directly using render Actions and I dont have any forwards with redirects="true". Due to this I am getting a Warning from struts-bridge that -- "Using the original action URL for render URL: A redirect should have been issued". So in such scenerios, should I have a dummy action which does nothing and has a forward with redirect="true" to my render action ?? I am sorry to ask this long question, but it is a little bit confusing to me .. :-( Thanks, Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Bridge - ActionRequest Related Question
Shah Amit wrote: Hi Ate, Thanks a lot for the quick reply. I am "submitting" a form with and here is the action mapping type="com.company.struts.actions.ViewerActions" name="viewerForm" scope="request" validate="false" parameter="dispatch"> So probably my question would be is it possible to submit a form to a render URL at all ... I guess No ?? ... So in that case, I will have to use a dummy action with redirect="true" ?? .. You should not "POST" a form to a render URL. Encode your parameter(s) in a renderURL (for example using the Struts Bridge RewriteTag) and just point your browser url to it (setting window.top.location). Thanks, Amit Original Message Follows From: Ate Douma <[EMAIL PROTECTED]> Reply-To: "Jetspeed Users List" To: Jetspeed Users List Subject: Re: Struts Bridge - ActionRequest Related Question Date: Fri, 01 Apr 2005 16:56:58 +0200 You *must* be using action URLs because this warning is *only* displayed from within processAction handling. Just make sure to use render URLs. Shah Amit wrote: Hi all, Please pardon my stupidity with the Struts bridge. I have read the documentation several times, and I understand what it says. However I have a little bit trouble visualizing it in my scenerio. I have a page with 3 dropdowns. Each dropdown has an onChange="submit" thing and the secod dropdown is loaded based on value of first, third is loaded based on second. And then there is a table on the page that is loaded based on the selection of third dropdown. I am using DispatchAction so that I have only one Action Class per page. Now this is an all display only page and actually the "state" is not being changed at all I think. In this case, for each form submission from the dropdowns, I am directly using render Actions and I dont have any forwards with redirects="true". Due to this I am getting a Warning from struts-bridge that -- "Using the original action URL for render URL: A redirect should have been issued". So in such scenerios, should I have a dummy action which does nothing and has a forward with redirect="true" to my render action ?? I am sorry to ask this long question, but it is a little bit confusing to me .. :-( Thanks, Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Bridge - ActionRequest Related Question
Hi Ate, I think I found my answer from the struts-bridge documentation --- "Forms must *always* use a POST to an ActionURL, but for all generated links it will have to be determined which type of url actually is required." So I guess I will have to use a dummy action that does nothing and then redirect to render action. Thanks for your help Amit Original Message Follows From: "Shah Amit" <[EMAIL PROTECTED]> Reply-To: "Jetspeed Users List" To: jetspeed-user@jakarta.apache.org Subject: Re: Struts Bridge - ActionRequest Related Question Date: Fri, 01 Apr 2005 10:05:31 -0500 Hi Ate, Thanks a lot for the quick reply. I am "submitting" a form with and here is the action mapping type="com.company.struts.actions.ViewerActions" name="viewerForm" scope="request" validate="false" parameter="dispatch"> So probably my question would be is it possible to submit a form to a render URL at all ... I guess No ?? ... So in that case, I will have to use a dummy action with redirect="true" ?? .. Thanks, Amit Original Message Follows---- From: Ate Douma <[EMAIL PROTECTED]> Reply-To: "Jetspeed Users List" To: Jetspeed Users List Subject: Re: Struts Bridge - ActionRequest Related Question Date: Fri, 01 Apr 2005 16:56:58 +0200 You *must* be using action URLs because this warning is *only* displayed from within processAction handling. Just make sure to use render URLs. Shah Amit wrote: Hi all, Please pardon my stupidity with the Struts bridge. I have read the documentation several times, and I understand what it says. However I have a little bit trouble visualizing it in my scenerio. I have a page with 3 dropdowns. Each dropdown has an onChange="submit" thing and the secod dropdown is loaded based on value of first, third is loaded based on second. And then there is a table on the page that is loaded based on the selection of third dropdown. I am using DispatchAction so that I have only one Action Class per page. Now this is an all display only page and actually the "state" is not being changed at all I think. In this case, for each form submission from the dropdowns, I am directly using render Actions and I dont have any forwards with redirects="true". Due to this I am getting a Warning from struts-bridge that -- "Using the original action URL for render URL: A redirect should have been issued". So in such scenerios, should I have a dummy action which does nothing and has a forward with redirect="true" to my render action ?? I am sorry to ask this long question, but it is a little bit confusing to me .. :-( Thanks, Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Bridge - ActionRequest Related Question
Hi Ate, Thanks a lot for the quick reply. I am "submitting" a form with and here is the action mapping type="com.company.struts.actions.ViewerActions" name="viewerForm" scope="request" validate="false" parameter="dispatch"> So probably my question would be is it possible to submit a form to a render URL at all ... I guess No ?? ... So in that case, I will have to use a dummy action with redirect="true" ?? .. Thanks, Amit Original Message Follows From: Ate Douma <[EMAIL PROTECTED]> Reply-To: "Jetspeed Users List" To: Jetspeed Users List Subject: Re: Struts Bridge - ActionRequest Related Question Date: Fri, 01 Apr 2005 16:56:58 +0200 You *must* be using action URLs because this warning is *only* displayed from within processAction handling. Just make sure to use render URLs. Shah Amit wrote: Hi all, Please pardon my stupidity with the Struts bridge. I have read the documentation several times, and I understand what it says. However I have a little bit trouble visualizing it in my scenerio. I have a page with 3 dropdowns. Each dropdown has an onChange="submit" thing and the secod dropdown is loaded based on value of first, third is loaded based on second. And then there is a table on the page that is loaded based on the selection of third dropdown. I am using DispatchAction so that I have only one Action Class per page. Now this is an all display only page and actually the "state" is not being changed at all I think. In this case, for each form submission from the dropdowns, I am directly using render Actions and I dont have any forwards with redirects="true". Due to this I am getting a Warning from struts-bridge that -- "Using the original action URL for render URL: A redirect should have been issued". So in such scenerios, should I have a dummy action which does nothing and has a forward with redirect="true" to my render action ?? I am sorry to ask this long question, but it is a little bit confusing to me .. :-( Thanks, Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Bridge - ActionRequest Related Question
You *must* be using action URLs because this warning is *only* displayed from within processAction handling. Just make sure to use render URLs. Shah Amit wrote: Hi all, Please pardon my stupidity with the Struts bridge. I have read the documentation several times, and I understand what it says. However I have a little bit trouble visualizing it in my scenerio. I have a page with 3 dropdowns. Each dropdown has an onChange="submit" thing and the secod dropdown is loaded based on value of first, third is loaded based on second. And then there is a table on the page that is loaded based on the selection of third dropdown. I am using DispatchAction so that I have only one Action Class per page. Now this is an all display only page and actually the "state" is not being changed at all I think. In this case, for each form submission from the dropdowns, I am directly using render Actions and I dont have any forwards with redirects="true". Due to this I am getting a Warning from struts-bridge that -- "Using the original action URL for render URL: A redirect should have been issued". So in such scenerios, should I have a dummy action which does nothing and has a forward with redirect="true" to my render action ?? I am sorry to ask this long question, but it is a little bit confusing to me .. :-( Thanks, Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts Bridge - ActionRequest Related Question
Hi all, Please pardon my stupidity with the Struts bridge. I have read the documentation several times, and I understand what it says. However I have a little bit trouble visualizing it in my scenerio. I have a page with 3 dropdowns. Each dropdown has an onChange="submit" thing and the secod dropdown is loaded based on value of first, third is loaded based on second. And then there is a table on the page that is loaded based on the selection of third dropdown. I am using DispatchAction so that I have only one Action Class per page. Now this is an all display only page and actually the "state" is not being changed at all I think. In this case, for each form submission from the dropdowns, I am directly using render Actions and I dont have any forwards with redirects="true". Due to this I am getting a Warning from struts-bridge that -- "Using the original action URL for render URL: A redirect should have been issued". So in such scenerios, should I have a dummy action which does nothing and has a forward with redirect="true" to my render action ?? I am sorry to ask this long question, but it is a little bit confusing to me .. :-( Thanks, Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]