struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Jouravlev <jmi...@gmail.com>
Subject [FORMDEF] Resetting booleans for session-scoped dynaforms
Date Wed, 12 Oct 2005 17:14:55 GMT
If Struts is about community and bringing people and Struts-related
tools together, not about one particular product anymore, then I'd ask
this question right here.

The question is inspired by katre's interest in checkboxes inside
dynaforms. I guess, there should be no problem with request-scoped
dynaforms, but session-scoped forms need to clear their
checkbox-related fields right before a form is populated.

Hubert, is it possible to add a feature in FormDef, which would allow to:
  * either clear all boolean fields when request comes;
  * or to clean only selected fields;
  * to choose, when to do the cleaning: for all types of requests,
    or for particular ones, like either POST or GET.

Something like this:

<form name="sampleForm" beanType="com.my.dto.SampleBean">
  <field property="contactMe"
    getter="getContactMe"
    setter="toggleContactMe"
    reset="POST, GET"/>     <=== Can be just "POST"; resets value to false
</form>

Currently, I need to clean the booleans for POST request only, this is
when input comes. I do not need to clean form on GET, this is when the
form is just displayed.

I would like to start using FormDef in my project.

Michael J.

--
Struts Dialogs
http://struts.sourceforge.net/strutsdialogs

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


Mime
View raw message