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"
> >           
> href="TemplateManager.do?prepare.dispatch"
> >            paramId="templateID"
> paramProperty="id"/>
> >    <display:column title="Category"
> >            property="category.name"
> sortable="true"
> >           
> href="TemplateManager.do?prepare.dispatch"
> >            paramId="templateID"
> paramProperty="id"/>
> > </display:table>
> > 
> > <html:submit property="remove.dispatch">
> > <bean:message key="button.remove"/>
> > </html:submit>
> > 
> > </html:form>
> > 
> > the problem is that the additional
> > search.dispatch=Search is inserted into the
> requestURI
> > when I 'view source'. I have no idea.
> > 
> > I am not sure if it is the DisplayTag limitation
> > though ...
> > 
> > thanks
> > li xin
> > 
> > --- Dakota Jack <[EMAIL PROTECTED]> wrote:
> > 
> > > All of your problems are caused because
> > > LookupDispatchAction creates a
> > > reverse mapping from the value of a parameter to
> its
> > > key, in order to
> > > get the method name.  This is not only resource
> > > intensive but also a
> > > constant source of the sorts of difficulties you
> are
> > > experiencing. You
> > > can find what are better alternatives in various
> > > places.  Some of them
> > > are itemized at
> > > http://www.michaelmcgrady.com/button/ .
> > >
> > > Jack
> > >
> > >
> > > On Wed, 27 Oct 2004 22:17:56 -0600, Kumar V
> Kadiyala
> > > <[EMAIL PROTECTED]> wrote:
> > > > Hi all,
> > > >
> > > > I'm using LookupDispatchAction to submit a
> form
> > > with multiple submit
> > > > buttons. The labels of the buttons are
> translated.
> > > The translated strings
> > > > are in a .properties file. I'm able to run the
> web
> > > app fine in English but
> > > > when I switch to Korean none of the the submit
> > > buttons work and I see the
> > > > following message in the log.
> > > > [10/27/04 21:40:39:631 MDT] 67f967f9
> DispatchActio
> > > E
> > > > org.apache.struts.actions.DispatchAction
> > > Request[/tag] does not contain
> > > > handler parameter named method
> > > >
> > > > The Korean .properties was converted to ascii
> > > (using nativetoascii) from
> > > > its native encoding. Does this have to do
> anything
> > > with what I'm noticing?
> > > > Should something additional be done when
> > > .properties files are coverted to
> > > > ascii?
> > > >
> > > > Help appreciated,
> > > > Kumar
> > > >
> > >
> > >
> > > --
> > > "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]
> > >
> > >
> > 
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Mail - Helps protect you from nasty
> viruses.
> > 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]
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to