Ok suppose to have a Form with a checkbox named isOn and a submit
button name Save
a NOT checked value will produce:
http://localhost:8080/webappointments/openChk.do?action=Save
a checked value will produce:
http://localhost:8080/webappointments/openChk.do?isOn=onaction=Save
The problem is
I'm coming into this discussion late, so ignore me if I'm out in left field,
but it sounds like you're unhappy that when *no* checkboxes are checked,
*no* methods get called.
When you submit the form, only successful form elements are sent in the
request, so if *no* checkboxes are checked,
Thanks a lot , you have been very clarifying.
I've found a tip placing code in validate method :
public ActionErrors validate( ActionMapping mapping, HttpServletRequest
req) {
String str = req.getParameter( isOn );
if (str == null)
isOn = false;
return
Kiuma wrote:
I've found a tip placing code in validate method :
But it's a very dirty technique of course.
That will work, but... what if you have a form that you don't want to
validate? The reason this is working is that you have validate set to true
so that the validate method gets called.
4 matches
Mail list logo