The code has nothing to do with myAction.dispatch.  And, the code is
not mine.  You have it all wrong: dispatch is not connected to the
action but to the html.  There is nothing related to action chaining
inconsistent with any of the alternatives.  I don't know what you've
done with the code, but ----- have fun!  And, good luck with this.

Jack


On Sat, 30 Oct 2004 18:49:33 -0700 (PDT), lixin chu <[EMAIL PROTECTED]> wrote:
> Hi Jack,
> you are right, it is indeed mixed up - all becuase I
> need to support action chaining. So I had to modify
> your code a bit 'cus it seems that the simple
> MyAction.dispatch can not support my case.
> 
> secondly, I just realize that even my <html:submit>
> code is wrong becuase 'value=xxx' will be used as
> label as well.
> 
> it seems that i can not simply use myAction.dispatch
> way to indicate which method I need and decouple the
> label/action at the same time.
> but your code certainly inspires me a lot. i am still
> working on this now.
> 
> thanks a lot.
> 
> 
> li xin
> 
> --- Dakota Jack <[EMAIL PROTECTED]> wrote:
> 
> > Hello, Chu,
> >
> > You seem to be a bit mixed up.  I am not even sure
> > which solution you
> > are using anymore.  However, if you are using the
> > solution at
> > www.michaelmcgrady.com/button we discussed, then you
> > have this coded
> > wrong.
> >
> > First, you should have nothing in the parameter
> > attribute of your
> > action mapping.  That is, the following code should
> > be deleted.
> >
> > <action /ListPermission>
> >  ...
> >  <parameter="ListPermission.dispatch">
> >  ...
> > </action>
> >
> > Second, the code
> >
> > <html:submit
> >   property="ListPermission.dispatch" value="done">
> >   <bean:message key="button.done"/>
> > </html:submit>
> >
> > is right only if you are trying to use a method
> > called
> > "ListPermission".  If you are trying to use a method
> > called "done"
> > with an action called "ListPermission", then this
> > code should be:
> >
> > <html:submit
> >    property='done.dispatch">
> >   <bean:message key='button.done'/>
> > </html:submit>
> >
> > This will result in the following parameters, for
> > example, being in
> > the request: done.dispatch.x=9 and
> > done.dispatch.y=37.
> >
> > You are making things too complex.  The solution
> > simply needs whatever
> > action [myAction' you want to be the value of the
> > property attribute
> > with ".dispatch" as a suffix, e.g.
> > property=myAction.suffix.
> >
> > Jack
> >
> >
> > On Sat, 30 Oct 2004 05:18:41 -0700 (PDT), lixin chu
> > <[EMAIL PROTECTED]> wrote:
> > > problem solved - I made a mistake in the JSP file,
> > > here is the right one to return a parameter for a
> > > submit button:
> > > <html:submit
> > >       property="ListPermission.dispatch"
> > value="done">
> > >  <bean:message key="button.done"/>
> > >  </html:submit>
> > >
> > > So in this case, if the Done button is pressed,
> > > 'ListPermission.dispatch=done' is sent to the
> > server.
> > >
> > > So now I hope I have a complete decoupled, I18N
> > aware
> > > DispatchAction. Thanks Jack !!!
> > >
> > > li xin
> > >
> > >
> > >
> > >
> > > --- lixin chu <[EMAIL PROTECTED]> wrote:
> > >
> > > > I realize that the problem is action chaining.
> > > >
> > > > In my code, action one goes on to the next
> > action -
> > > > I
> > > > persume that the parameters passed to the first
> > > > action
> > > > are still passed on to the next. here the
> > problem
> > > > comes in: new parameter is appended at end so
> > > > getMethodName always gets the earlier parameter.
> > > >
> > > > So I tried to use a class specific parameter
> > > > (together
> > > > with the parameter used in Action mapping). This
> > > > solves action chaining but them I got the submit
> > > > button problem:
> > > >
> > > > here is my jsp file:
> > > > <html:submit
> > > > property="ListPermission.dispatch=done">
> > > >  <bean:message key="button.done"/>
> > > > </html:submit>
> > > >
> > > > here is the partial action mapping:
> > > > <action /ListPermission>
> > > >   ...
> > > >   <parameter="ListPermission.dispatch">
> > > >   ...
> > > > </action>
> > > >
> > > > the intersting thing is that when the 'Done'
> > button
> > > > is
> > > > clicked, the property is not passed in as
> > parameter.
> > > > I
> > > > am lost. do not know why it is like this.
> > > >
> > > > anyway, thank you very much for your code and
> > > > anwser.
> > > >
> > > > li xin
> > > >
> > > >
> > > >
> > > > --- Dakota Jack <[EMAIL PROTECTED]> wrote:
> > > >
> > > > > I notice that your original question had to do
> > > > with
> > > > > multiple submit
> > > > > buttons, but that your code here only has one
> > > > submit
> > > > > button.  You
> > > > > cannot necessarily take a solution for one
> > problem
> > > > > and use if for
> > > > > others.  I don't know about the display tag,
> > so I
> > > > am
> > > > > not sure if you
> > > > > are doing the right thing here.  I don't have
> > time
> > > > > to look at it in
> > > > > further detail at this time.
> > > > >
> > > > > Jack
> > > > >
> > > > > On Fri, 29 Oct 2004 19:46:53 -0700 (PDT),
> > lixin
> > > > chu
> > > > > <[EMAIL PROTECTED]> wrote:
> > > > > > hi jack,
> > > > > > thanks, the solution is cool ! I am trying
> > it.
> > > > > >
> > > > > > a small problem i am experiencing now is
> > that (i
> > > > > am
> > > > > > not sure if there is something wrong in my
> > > > > > configuration), the parameter on one page is
> > > > > passed on
> > > > > > to the next page, so when we getMethod, the
> > > > > earlier
> > > > > > method name is returned.
> > > > > >
> > > > > > I have one 'Search Template' page, which
> > gets
> > > > the
> > > > > > search criteria and then pass the results to
> > the
> > > > > > ListTemplate.jsp page after pressing the
> > Search
> > > > > button
> > > > > > (it is associated with the 'search.dispatch'
> > > > > > parameter). The 'list parameter' page has a
> > > > > sortable
> > > > > > table (i am using DisplayTag):
> > > > > >
> > > > > > <html:form action="/admin/ListTemplate">
> > > > > > <display:table name="templates"
> > > > > >                pagesize="10"
> > > > > >                id="templates"
> > > > > >                sort="list" export="true"
> > > > > >    requestURI="/Canal/admin/ListTemplate.do?
> > > > > >                sort.dispatch">
> > > > > >
> > > > > > <display:setProperty
> > > > name="basic.empty.showtable"
> > > > > >                      value="true"/>
> > > > > >    <display:column media="html">
> > > > > >      <input type=checkbox
> > > > > >             name="value(<bean:write
> > > > > name="templates"
> > > > > >             property="id"/>)" value="x"/>
> > > > > >    </display:column>
> > > > > >    <display:column title="Name"
> > property="name"
> > > > > >             sortable="true"
> > > > > >
> >
> === message truncated ===
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We finish.
> 
> 
> http://promotions.yahoo.com/new_mail
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to