struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Munsch <>
Subject Actions invoked by links have more flexibility than those driven by forms?
Date Thu, 02 Jan 2003 20:21:33 GMT
With an html:link I can embed a reference to a parameter or multiple

<html:link paramId="id" paramName="myBean" paramProperty="id" 
forward="/test">Click Me</html:link>

Note that this will call whatever /test maps to with "?id=<some #>"
after it. And if I create /test as a global forward and map that to some
action mapping (e.g. /test points to / then an action gets
called with either one or more parameters passed through to it.

On the other hand, with html:form I don't seem to have the same
functionality. I don't see a way to refer to a parameter or set of
parameters in the html:form tag so that I can pass through parameters
that way. So I pretty much have to pass through anything I want to send
to an action invoked through a form using the ActionForm that it gets
when it is called.

My question is: Why? Since the action for the form is written into the
HTML in much the same fashion as a link is written, why can't you make
reference to one or even multiple parameters that you want to be written
into that URL via the same mechanisms that are available through
html:link? Why not:

<html:form paramId="id" paramName="myBean" paramProperty="id" 

Or am I missing something completely?
John Munsch <>
PDX, Inc.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message