Well, how Wicket is going to be better than Struts or JSF if you are
doing the same thing? A lot of built-in call sequences that are hard
to override. Same as with Struts reset/populate/validate. Everyone can
turn off validation by setting parameter in xml file, but it is
impossible to turn reset or population off.

Same happens in Wicket, and a lot. Why do you want to do everything
automatically? I want to have an option: to do it either myself or to
delegate it to the framework. Consider above fragment:

// when processing was triggered by a Wicket button and 
// that button indicates it wants to be called immediately 
// (without validating), call onSubmit right away.
if (submittingButton != null && (submittingButton.isImmediate()))
{
  submittingButton.onSubmit();
}
else
{
  // validation, error handling, model updating, 
  // delegating submit (to button and form)
  ...
}

Throw out this "immediate" flag and just leave it like this:

// when processing was triggered by a Wicket button and 
// that button indicates it wants to be called immediately 
// (without validating), call onSubmit right away.
if (submittingButton != null)
{
  submittingButton.onSubmit();
}
else
{
  // validation, error handling, model updating, 
  // delegating submit (to button and form)
  ...
}

Then allow me to call default process() method from my onSubmit()
method, or to call finer-grained validate(), update(), etc. instead of
process(). This is it. If I want default event handling (which I
usually will want to), I will call process(). It is so much simpler to
write one line of code and to see what is actually happening, than to
figure out who and when will can your handler.

Michael.


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to