RE: image submit and lookupDispatchAction - drives me struts
Well, yes, you could say: Look for anything in the request that matches a pattern. Then it has to iterate through all request parameters and execute the matching algorithm on each parameter. By defining a list of names to expect, then I'm performing a hash key lookup on each element in a very small list. robert -Original Message- From: Axel Groß [mailto:[EMAIL PROTECTED] Sent: Thursday, July 01, 2004 4:40 AM To: Struts Users Mailing List Subject: Re: image submit and lookupDispatchAction - drives me struts hi robert! that's really nicely written code. I'm not completely sure, why it does what i think it does though: you limit, which methods should get called in the struts-config, right? (by specifying a list of the allowed buttonnames in the mapping) then you check if there is a [buttonname].x in the request which fits, right? this indicates the button [buttonname] has been pressed so you dispatch to lookup with [buttonname] as lookup key so what is the intention for limiting the methods to the specified set? if i change it to ignore the dynamic part of the button name it should work for me; i should add some regexp lookup, maybe :) thanks, axel On 2004-06-28 at 12:00:22 -0400, Robert Taylor wrote: This may help: http://issues.apache.org/bugzilla/show_bug.cgi?id=19925 robert -Original Message- From: Axel Groß [mailto:[EMAIL PROTECTED] Sent: Monday, June 28, 2004 11:52 AM To: Struts Users Mailing List Subject: Re: image submit and lookupDispatchAction - drives me struts Hi Wendy thanks for the reply and the link! But unfortunately i can't see how to implement those solutions to my problem (which I didn't describe elaborate enought) My button names are of dynamic nature like DELETE_PROPERTY 'firstname' (here firstname is the key of the property to delete) so I can't use it for populating a bean. Or would using DynaBeans help in this case? I don't know, in which class the html requests are ~transformed to beans, so I'm not sure how it is handled. I rely would like to get rid of that horrible names. Javascript isn't feasible for this project. I suppose html 4.0 buttons could solve the problem, I'll try that. But relying on html 4.0 also doesn't sound too good. :( thanks again, Axel On 2004-06-25 at 09:12:07 -0700, Wendy Smoak wrote: From: Axel Groß [mailto:[EMAIL PROTECTED] so the html:submit buttons do work, but neither of the html:image buttons pass the parameter on and i get a null reference for request.getParameter(parameter); (with parameter.equals(action)) the resulting error message is: Request[/action/lookupDispatch] does not contain handler parameter named action anybody knows what could help? http://www.google.com/search?q=struts+image+button First hit: http://www.jguru.com/faq/view.jsp?EID=893423 which discusses the use of the ImageButtonBean class. Or, my preferred solution is a bit of onClick JavaScript to set the form property and submit the form. This only works in situations where where you can require that JavaScript be enabled. -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - 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: image submit and lookupDispatchAction - drives me struts
hi robert! that's really nicely written code. I'm not completely sure, why it does what i think it does though: you limit, which methods should get called in the struts-config, right? (by specifying a list of the allowed buttonnames in the mapping) then you check if there is a [buttonname].x in the request which fits, right? this indicates the button [buttonname] has been pressed so you dispatch to lookup with [buttonname] as lookup key so what is the intention for limiting the methods to the specified set? if i change it to ignore the dynamic part of the button name it should work for me; i should add some regexp lookup, maybe :) thanks, axel On 2004-06-28 at 12:00:22 -0400, Robert Taylor wrote: This may help: http://issues.apache.org/bugzilla/show_bug.cgi?id=19925 robert -Original Message- From: Axel Groß [mailto:[EMAIL PROTECTED] Sent: Monday, June 28, 2004 11:52 AM To: Struts Users Mailing List Subject: Re: image submit and lookupDispatchAction - drives me struts Hi Wendy thanks for the reply and the link! But unfortunately i can't see how to implement those solutions to my problem (which I didn't describe elaborate enought) My button names are of dynamic nature like DELETE_PROPERTY 'firstname' (here firstname is the key of the property to delete) so I can't use it for populating a bean. Or would using DynaBeans help in this case? I don't know, in which class the html requests are ~transformed to beans, so I'm not sure how it is handled. I rely would like to get rid of that horrible names. Javascript isn't feasible for this project. I suppose html 4.0 buttons could solve the problem, I'll try that. But relying on html 4.0 also doesn't sound too good. :( thanks again, Axel On 2004-06-25 at 09:12:07 -0700, Wendy Smoak wrote: From: Axel Groß [mailto:[EMAIL PROTECTED] so the html:submit buttons do work, but neither of the html:image buttons pass the parameter on and i get a null reference for request.getParameter(parameter); (with parameter.equals(action)) the resulting error message is: Request[/action/lookupDispatch] does not contain handler parameter named action anybody knows what could help? http://www.google.com/search?q=struts+image+button First hit: http://www.jguru.com/faq/view.jsp?EID=893423 which discusses the use of the ImageButtonBean class. Or, my preferred solution is a bit of onClick JavaScript to set the form property and submit the form. This only works in situations where where you can require that JavaScript be enabled. -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - 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: image submit and lookupDispatchAction - drives me struts
Hi Wendy thanks for the reply and the link! But unfortunately i can't see how to implement those solutions to my problem (which I didn't describe elaborate enought) My button names are of dynamic nature like DELETE_PROPERTY 'firstname' (here firstname is the key of the property to delete) so I can't use it for populating a bean. Or would using DynaBeans help in this case? I don't know, in which class the html requests are ~transformed to beans, so I'm not sure how it is handled. I rely would like to get rid of that horrible names. Javascript isn't feasible for this project. I suppose html 4.0 buttons could solve the problem, I'll try that. But relying on html 4.0 also doesn't sound too good. :( thanks again, Axel On 2004-06-25 at 09:12:07 -0700, Wendy Smoak wrote: From: Axel Groß [mailto:[EMAIL PROTECTED] so the html:submit buttons do work, but neither of the html:image buttons pass the parameter on and i get a null reference for request.getParameter(parameter); (with parameter.equals(action)) the resulting error message is: Request[/action/lookupDispatch] does not contain handler parameter named action anybody knows what could help? http://www.google.com/search?q=struts+image+button First hit: http://www.jguru.com/faq/view.jsp?EID=893423 which discusses the use of the ImageButtonBean class. Or, my preferred solution is a bit of onClick JavaScript to set the form property and submit the form. This only works in situations where where you can require that JavaScript be enabled. -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - 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: image submit and lookupDispatchAction - drives me struts
This may help: http://issues.apache.org/bugzilla/show_bug.cgi?id=19925 robert -Original Message- From: Axel Groß [mailto:[EMAIL PROTECTED] Sent: Monday, June 28, 2004 11:52 AM To: Struts Users Mailing List Subject: Re: image submit and lookupDispatchAction - drives me struts Hi Wendy thanks for the reply and the link! But unfortunately i can't see how to implement those solutions to my problem (which I didn't describe elaborate enought) My button names are of dynamic nature like DELETE_PROPERTY 'firstname' (here firstname is the key of the property to delete) so I can't use it for populating a bean. Or would using DynaBeans help in this case? I don't know, in which class the html requests are ~transformed to beans, so I'm not sure how it is handled. I rely would like to get rid of that horrible names. Javascript isn't feasible for this project. I suppose html 4.0 buttons could solve the problem, I'll try that. But relying on html 4.0 also doesn't sound too good. :( thanks again, Axel On 2004-06-25 at 09:12:07 -0700, Wendy Smoak wrote: From: Axel Groß [mailto:[EMAIL PROTECTED] so the html:submit buttons do work, but neither of the html:image buttons pass the parameter on and i get a null reference for request.getParameter(parameter); (with parameter.equals(action)) the resulting error message is: Request[/action/lookupDispatch] does not contain handler parameter named action anybody knows what could help? http://www.google.com/search?q=struts+image+button First hit: http://www.jguru.com/faq/view.jsp?EID=893423 which discusses the use of the ImageButtonBean class. Or, my preferred solution is a bit of onClick JavaScript to set the form property and submit the form. This only works in situations where where you can require that JavaScript be enabled. -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - 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]
image submit and lookupDispatchAction - drives me struts
hi there! i wanted to use images to hide my ugly submit button names, but exchanging html:submit with html:image doesn't work; this is what is rendered: html:submit property=action fmt:message key=profiles_action_${ownerName}_${prepopulatedActionPart}/ /html:submitbr/ html:image src=images/edit-button.jpg property=action fmt:message key=profiles_action_${ownerName}_${prepopulatedActionPart}/ /html:imagebr/ bean:define id=editButton type=java.lang.Stringfmt:message key=profiles_action_${ownerName}_${prepopulatedActionPart}//bean:define html:submit property=action value=${editButton}/br/ html:image src=images/edit-button.jpg property=action value=${editButton}/ gets rendered to input type=submit name=action value=EDIT_USER /br/ input type=image name=action src=images/edit-button.jpg / input type=submit name=action value=EDIT_USER /br/ input type=image name=action src=images/edit-button.jpg value=EDIT_USER / so the html:submit buttons do work, but neither of the html:image buttons pass the parameter on and i get a null reference for request.getParameter(parameter); (with parameter.equals(action)) the resulting error message is: Request[/action/lookupDispatch] does not contain handler parameter named action anybody knows what could help? thanks, axel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: image submit and lookupDispatchAction - drives me struts
From: Axel Groß [mailto:[EMAIL PROTECTED] so the html:submit buttons do work, but neither of the html:image buttons pass the parameter on and i get a null reference for request.getParameter(parameter); (with parameter.equals(action)) the resulting error message is: Request[/action/lookupDispatch] does not contain handler parameter named action anybody knows what could help? http://www.google.com/search?q=struts+image+button First hit: http://www.jguru.com/faq/view.jsp?EID=893423 which discusses the use of the ImageButtonBean class. Or, my preferred solution is a bit of onClick JavaScript to set the form property and submit the form. This only works in situations where where you can require that JavaScript be enabled. -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]