starki78 wrote:
thank you!
I found out the following (part)solution:
this works and calls the dispatch action:
<html:link action="/lookupdispatch2?method=nix"/>
</html:link>
this doesn't work:
<html:link action="/lookupdispatch2" paramProperty="method"
paramName="nix">
</html:link>
Can you give me a tip?
Thanks!
//--<this works
<html:form action="/lookupdispatch2">
<html:submit property="method">
<bean:message key="button.nix"/>
</html:submit>
dispatch from a link
<html:link action="/lookupdispatch2.do" paramId="method" >
<bean:message key="button.nix"/>
</html:link>
</html:form>
I get the error after clicking the link:
Request[/lookupdispatch2] does not contain handler parameter named
'method'.
Can someone help me?
Thank you!
Ciao
paramName and paramProperty are used when you need to build a link
"run-time" depending on some bean and bean properties. For example, I
want to edit my Booking object which have following properties:
Booking: name(String), id(long), parent(otherobjectreference)
Now imagine that I want to edit this object using some acton so first I
make: (this code is in the action that shows the page where wiil the
link appear)
Booking booking = Booking.loadById(123);
request.setAttribute("currentbooking", booking);
then in the jsp I have the following snippet:
<html:link action="/dispatchBooking.do?method=edit" paramProperty="id" paramName="booking"
paramId="bookingid" paramScope="request">
edit current booking
</html:link>
this will generate me a link with
href="/dispatchBooking.do?method=edit&bookingid=123" i.e. the url is depending
on the property values of Booking object.
In your case it's much better to "hard code" the link as
/lookupdispatch2.do?method=edit since this is not depending on some dynamic information
needed at runtime.
Regards
Borislav
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]