Re: [Stripes-users] Stripes UrlBinding - Parameter disappears on submit
Yeah, or use method=GET in the form ? Clean URLs don't really make sense for POST requests anyway... Cheers Remi 2012/8/30 Nathan Maves nathan.ma...@gmail.com I think you should be using stripes:link and not the form tag. On Wed, Aug 29, 2012 at 8:52 PM, Derrick Chua derr...@gateairfares.com wrote: I use URL bindings on all my actionbeans and some of them requires a parameter, e.g. /admin/users/123. Taking this URL as an example, in my actionbean I am able to get the parameter 123 and display user information fine. The same page allows changes to user information and this is where the problem comes in. On submitting the updated user information, the URL becomes /admin/users. This is a problem because calling context.getRequest().getRequestURL() returns me /admin/users instead of /admin/users/123. I reckon this to be due to the way the tag is written in the jsp: stripes:form beanclass=com.name.ui.web.stripes.action.admin.UserActionBean.../stripes:form which resolves to form action=/admin/users method=post.../form The corresponding actionbean is coded and annotated as such: @UrlBinding(/admin/users/{userId}) public class UserActionBean{ private long userId; public long getUserId(){return userId;} public void setUserId(long userId){this.userId=userId;} } Has anyone encountered the same problem and managed to solve it? -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Stripes UrlBinding - Parameter disappears on submit
The stripes:param tag can be used inside the form to provide the parameters required to generate the clean url. e.g. stripes:form beanclass=${actionBean.class} stripes:param name=userId value=${actionBean.userId}/ /stripes:form Hope that helps. Thanks, M On 08/30/12 03:52 AM, Derrick Chua wrote: I use URL bindings on all my actionbeans and some of them requires a parameter, e.g. /admin/users/123. Taking this URL as an example, in my actionbean I am able to get the parameter 123 and display user information fine. The same page allows changes to user information and this is where the problem comes in. On submitting the updated user information, the URL becomes /admin/users. This is a problem because calling context.getRequest().getRequestURL() returns me /admin/users instead of /admin/users/123. I reckon this to be due to the way the tag is written in the jsp: stripes:form beanclass=com.name.ui.web.stripes.action.admin.UserActionBean.../stripes:form which resolves to form action=/admin/usersmethod=post.../form The corresponding actionbean is coded and annotated as such: @UrlBinding(/admin/users/{userId}) publicclassUserActionBean{ privatelonguserId; publiclonggetUserId(){returnuserId;} publicvoidsetUserId(longuserId){this.userId=userId;} } Has anyone encountered the same problem and managed to solve it? -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Stripes UrlBinding - Parameter disappears on submit
That works! Thanks for the tip! -Original Message- From: Martin Walsh [mailto:martin.wa...@oracle.com] Sent: Thursday, 30 August, 2012 5:04 PM To: Stripes Users List Cc: Derrick Chua Subject: Re: [Stripes-users] Stripes UrlBinding - Parameter disappears on submit The stripes:param tag can be used inside the form to provide the parameters required to generate the clean url. e.g. stripes:form beanclass=${actionBean.class} stripes:param name=userId value=${actionBean.userId}/ /stripes:form Hope that helps. Thanks, M On 08/30/12 03:52 AM, Derrick Chua wrote: I use URL bindings on all my actionbeans and some of them requires a parameter, e.g. /admin/users/123. Taking this URL as an example, in my actionbean I am able to get the parameter 123 and display user information fine. The same page allows changes to user information and this is where the problem comes in. On submitting the updated user information, the URL becomes /admin/users. This is a problem because calling context.getRequest().getRequestURL() returns me /admin/users instead of /admin/users/123. I reckon this to be due to the way the tag is written in the jsp: stripes:form beanclass=com.name.ui.web.stripes.action.admin.UserActionBean.../s tripes:form which resolves to form action=/admin/usersmethod=post.../form The corresponding actionbean is coded and annotated as such: @UrlBinding(/admin/users/{userId}) publicclassUserActionBean{ privatelonguserId; publiclonggetUserId(){returnuserId;} publicvoidsetUserId(longuserId){this.userId=userId;} } Has anyone encountered the same problem and managed to solve it? -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
[Stripes-users] Stripes UrlBinding - Parameter disappears on submit
I use URL bindings on all my actionbeans and some of them requires a parameter, e.g. /admin/users/123. Taking this URL as an example, in my actionbean I am able to get the parameter 123 and display user information fine. The same page allows changes to user information and this is where the problem comes in. On submitting the updated user information, the URL becomes /admin/users. This is a problem because calling context.getRequest().getRequestURL() returns me /admin/users instead of /admin/users/123. I reckon this to be due to the way the tag is written in the jsp: stripes:form beanclass=com.name.ui.web.stripes.action.admin.UserActionBean.../stripes :form which resolves to form action=/admin/users method=post.../form The corresponding actionbean is coded and annotated as such: @UrlBinding(/admin/users/{userId}) public class UserActionBean{ private long userId; public long getUserId(){return userId;} public void setUserId(long userId){this.userId=userId;} } Has anyone encountered the same problem and managed to solve it? -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Stripes UrlBinding - Parameter disappears on submit
I think you should be using stripes:link and not the form tag. On Wed, Aug 29, 2012 at 8:52 PM, Derrick Chua derr...@gateairfares.com wrote: I use URL bindings on all my actionbeans and some of them requires a parameter, e.g. /admin/users/123. Taking this URL as an example, in my actionbean I am able to get the parameter 123 and display user information fine. The same page allows changes to user information and this is where the problem comes in. On submitting the updated user information, the URL becomes /admin/users. This is a problem because calling context.getRequest().getRequestURL() returns me /admin/users instead of /admin/users/123. I reckon this to be due to the way the tag is written in the jsp: stripes:form beanclass=com.name.ui.web.stripes.action.admin.UserActionBean.../stripes:form which resolves to form action=/admin/users method=post.../form The corresponding actionbean is coded and annotated as such: @UrlBinding(/admin/users/{userId}) public class UserActionBean{ private long userId; public long getUserId(){return userId;} public void setUserId(long userId){this.userId=userId;} } Has anyone encountered the same problem and managed to solve it? -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users