Don't mark the fields as required and check the fields during the submit of the 
save and throw appropriate error message. The save as draft would not check the 
fields. It is not the most elegant solution but it works and is easy to 
implement. 


On Mar 31, 2012, at 10:18 PM, "Emmanouil Batsis (Manos)" <ma...@abiss.gr> wrote:

> 
> I have a usecase for saving a draft of a form before actually submitting it.
> 
> I'm trying to figure out how to only skip the "required" validators using a 
> "save draft" submit button in my form. Disabling default form processing 
> sounds like using a bazooka to shoot down a fly considering my form has a 
> dynamic number of fields etc.
> 
> My only thought so far is to keep a reference of mandatory fields and call 
> their setRequired with false within the submit button's onSubmit.
> 
> Would that work? Is there a better way?
> 
> Cheers,
> 
> Maons
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to