Thanks, Carlos,
The difficulty in getting the page up had rather overshadowed any discussion of what they say. I have quite a lot yet to add to the page. I would indeed appreciate any efforts to assist. Be my guest.
Michael McGrady
Carlos Cajina - Hotmail wrote:
I'll sure be waiting for them Mr. McGrady :^) Thanks for your time! By the way, I'll be glad to help out with "polishing" the page, if there's anything I can do please let me know; the solutions proposed are worth the effort of a good documentation...
----- Original Message ----- From: "Michael McGrady" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, September 24, 2004 12:17 PM
Subject: Re: [HOW TO? ImageButtonBeanManager Extension]
ofAnswers to your other questions to follow in a bit, Carlos.
Carlos Cajina - Hotmail wrote:
Good morning.
Thanks to Mr. McGrady for his suggestion. I think the persistent nature
preciselythe need to handle multiple (image) buttons in web applications is
decidedwhat makes this problem so recurrent ;^)
I've moved from the 'ImageButtonBeanManager Extension' approach and
andto try to get SOLUTION TWO up & running but I've ran into a few problems
variablethought that maybe you could spare some time to help me out.
Issue #1
-----------
- In the SOLUTON ONE: DispatchUtil Solution Code the 'log' variable
declaration is as follows: protected static Log log =
LogFactory.getLog(DispatchUtil.class);
- In the SOLUTION TWO: (new) DispatchAction Solution Code the 'log'
doesdeclaration is as follows: protected static Log log =
LogFactory.getLog(SimpleDispatchAction.class);
* My first question is: In the second 'log' variable declaration, Where
bySimpleDispatchAction.class comes from? Shouldn't it read DispatchAction.class?
Issue #2
-----------
- I have a class that extends my (new) DispatchAction class. Within this
class I have coded the methods that will perform the actions referenced
Ithe <html:submit...> buttons in my forms, i.e. public ActionForward [ next | back | finish ] ( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ... } - In my JSP forms, every button is defined like this: <html:form action="/wizard"> <html:hidden property="page" value="[ 1 | 2 | 3... ]" />
<bean:message key="someField.label" /> <html:text property="someField" />
<html:submit property="back.dispatch"> <bean:message key="button.back" /> </html:submit>
<html:cancel> <bean:message key="button.cancel" /> </html:cancel>
<html:submit property="next.dispatch">
<bean:message key="button.next" />
</html:submit>
</html:form>
* My second question is kinda stupid: What's next? I mean, It seems like
stylecan use struts-config.xml to get things working MappingDispatchAction
Use]or LookupDispatchAction style, but since the (new) DispatchAction (aka DispatchUtil) takes care of things transparently, What would be the next step to implement SOLUTION TWO?
Issue #3
-----------
* I don't get what this means :^( [Section 3.1. Action Class Code to
Flow"In all the following tag uses, you use the Action class code in execute(...) or process(...) as given directly below. ActionForward = forward = new DispatchUtil().dispatch(this,mapping,form,request,response);"
Again, any help would be greatly appreciated.
Have a nice day!
Regards,
Carlos
----- Original Message ----- From: "Michael McGrady" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, September 23, 2004 9:00 PM
Subject: Re: [HOW TO? ImageButtonBeanManager Extension]
documentation I understand that what I need to do is create my ActionCarlos,
This solution just adds weight (ImageButtonBean) on top of (DispatchAction) and combines what are the same solutions really. I would suggest you look at what might be improvements to this sort of suggestion at http://wiki.apache.org/struts/StrutsCatalogFiveMultipleButtonSolutions .
Amazing how oftent this comes up.
Michael McGrady
Carlos Cajina - Hotmail wrote:
Hi. I'm tryin' to add this Strust extension to my project and from the
Formusing the SubmitButtonForwardDispatchAction, but after coding my Action
[org.apache.struts.action.RequestProcessor]and Action classes and setting up struts-config.xml I keep getting this error:
2004-09-23 19:10:08,062 DEBUG
[org.apache.struts.action.RequestProcessor]
Looking for Action instance for class com.mitranosoft.struts.actions.SubmitButtonForwardDispatchAction
2004-09-23 19:10:08,062 DEBUG
and
Creating new Action instance
[com.mitranosoft.struts.actions.SubmitButtonForwardDispatchAction]2004-09-23 19:10:08,156 WARN
SubmitButtonForwardDispatchAction.execute(): Warning - Error encountered
ofhandled while attempting to locate ActionForward property-name=[ submit ]
e[EMAIL PROTECTED], for Request=[[EMAIL PROTECTED]/webm/asist
nte.do,contextPath=/webm,method=POST,queryString=<null>,sessionId=BDCA619715
s[EMAIL PROTECTED],path=/index.jA1B419D6785F9CAADC7185] ].
[com.mitranosoft.struts.util.DefaultActionForwardSelector]2004-09-23 19:10:08,156 DEBUG
DefaultActionForwardSelector.getActionForward(): Returning a default
ActionForward matching name=[ otherwise ]. ActionForward=[
ep,redirect=false,contextRelative=false] ], ActionForm=[[EMAIL PROTECTED]/webm/asist
[EMAIL PROTECTED] ], for Request=[
nte.do,contextPath=/webm,method=POST,queryString=<null>,sessionId=BDCA619715
ActionFormA1B419D6785F9CAADC7185] ]
[com.mitranosoft.struts.actions.SubmitButtonForwardDispatchAction]2004-09-23 19:10:08,156 WARN
SubmitButtonForwardDispatchAction.execute(): Warning - A default
shas been selected or created, ActionForward=[[EMAIL PROTECTED],path=/index.j
forp,redirect=false,contextRelative=false] ], because no property was found
eproperty-name=[ submit ] of [EMAIL PROTECTED], for[EMAIL PROTECTED]/webm/asist
Request=[
nte.do,contextPath=/webm,method=POST,queryString=<null>,sessionId=BDCA619715
[org.apache.struts.action.RequestProcessor]A1B419D6785F9CAADC7185] ]
2004-09-23 19:10:08,156 DEBUG
fprocessForwardConfig(ForwardConfig[name=otherwise,path=/index.jsp,redirect=
processalse])
- In each of JSP's I have this for my buttons except for <html:cancel>: <html:submit property="submit">
<bean:message key="button.XXXX" /> // Where XXXX could be 'next',
'back', 'finish'
SubmitButtonForwardDispatchAction action- does the job of automatically</html:submit>
I understand that the extension -through the
mapping a <html:submit...> button to an Action that is supposed to
kindthe specific business logic that button encapsulates, acting like some
wheneverof hub for every incoming button click in the JSP forms, but I don't know whether I am missing something because things just won't work.
SubmitButtonForwardDispatchAction for a 'cancel' action works fine,It's worth saying that the mapping in the
location;I hit the cancel button in my form I'm redirected to the correct
everytimealso the 'otherwise' mapping works good... it's were I'm taken to
I hit the next button and the errors pops up in the log files :^P
For any help, my eternal gratitude :^)
Have a nice evening.
Regards,
Carlos
--------------------------------------------------------------------- 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]