cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Michels <>
Subject RE: Declarative XMLForm
Date Mon, 28 Apr 2003 07:52:25 GMT

On Sun, 27 Apr 2003, DURDINA Michal wrote:

> (Sorry, previous send was accidental :)
> First of all, this probably should not happen in well-designed view, because
> all command invocations should be represented only by links/buttons.
> Therefore instead of "customize color" checkbox, there should be a button
> "Customize color" for invoking the 'customization' command which will lead
> to the customization view and one button "Finish" to invoke the 'finish'
> command which will lead to confirm view or whatever next view.
> Example:
> <command name="custcolor" from-view="configuration"
> to-view="customize-color"/>
> <command name="finish" from-view="configuration" to-view="confirmation"/>
> If you need to handle a special view selection that couldn't be handled only
> by "command+from-view" pair distinction then you need to implement
> user-defined method for the command and choose the next view there.
> Example:
> <command name="next" from-view="configuration" method="chooseView"
> to-view="confirmation"/>
> public String chooseView(String command, String fromView, String toView,
> String role, Object model) {

One point, you shouldn't use the model as argument, you should use
the form class instead, because you want certainly add custom violations
to the form, which couldn't be tested by a validator.


View raw message