hi boraldo
a very simple way should be:
Action:
YourActionConnetedToTheFormAction extends Action..{
execute(..){
String qString = request.getQueryString();
if(qString!=null && paramsFound(...))
// *paramsFound() = check if your formParams were given by query String
}
else {
//check if your formBean is set (depends on the scope you have set in
your struts-config.xml)
//e.g.
if(request.getAttribute(yourForm)!=null) {
yourForm.validate() {
}
}
}
}
should work ;)
boraldo wrote:
I have a form. And I want to have one url for form itself and for submitting
it.
Controller should look at method and if it is GET, show form, if POST - make
validations and so on.
How can I do it ?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org