struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "El Harouchi, Jaafar [IT]" <jaafar.elharou...@citigroup.com>
Subject RE: DispatchAction?
Date Thu, 19 Jun 2003 05:12:48 GMT
Try
in your submit or url: onclick=setMethod(this.form, 'whatever');

A. function setMethod(form, method) {
	form.action = form.action + "?dispatchMethod=" + method;
}

or B. have a hidden field and correspong ActionForm field
	<html:hidden property="dispatchMethod"?
and
function setMethod(form, method) {
	form.dispatchMethod.value=method;
}	

A requires you to manage form.action but B requires a hidden field.
( I'd go for B)

-jaafar


-----Original Message-----
From: Ashutosh Satyam [mailto:ashutosh.satyam@alopa.com]
Sent: Thursday, June 19, 2003 1:01 AM
To: Struts Users Mailing List
Subject: RE: DispatchAction?


Other parameters can go as part of action. In your case you can put it as.
<html:form action="/order?method=create" focus="date">

I have not tried this but mostly I feel it should work.

Cheers,
Ashutosh

-----Original Message-----
From: Bjorn T Johansen [mailto:btj@havleik.no]
Sent: Thursday, June 19, 2003 10:16 AM
To: struts-user@jakarta.apache.org
Subject: DispatchAction?

I am starting to use DispatchAction instead of some of my actions to
simplify CRUD operations, but I have a question.
How do I integrate which method to call in a html:form tag? I.e. if I could
write http://localhost/app/order?method=create then it wouldn't be a
problem, but how do I write the same thing using html:form?
(<html:form action="/order" focus="date"> where should I put the method
parameter? )


Regards,

BTJ


----------------------------------------------------------------------------
-------------------
Bjørn T Johansen (BSc,MNIF)
Executive Manager
btj@havleik.no                  Havleik Consulting
Phone : +47 67 54 15 17         Conradisvei 4
Fax : +47 67 54 13 91           N-1338 Sandvika
Cellular : +47 926 93 298       http://www.havleik.no
----------------------------------------------------------------------------
-------------------
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
----------------------------------------------------------------------------
-------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message