Wicket should buffer entered values AS THEY WERE, without conversion.
* Buffering input values -- is webfront's job
* Validating -- is model's job
* Converting from string to proper type -- I don't know who's job is
it, can be either I guess

Getters should return string, EXACTLY AS IT WAS ENTERED. But better
yet, that these input values were buffered by framework, so model
would contain data-specific getters. Model should probably return a
boolean or have a flag or whatever, that buffer should be reloaded
from model, or kept as it was.

If you prefer to throw exception from model, then you would have to
make sure that exception contains message key as well as actual
message arguments. Or you may return String[][] msg, where msg[0] is
the message key, and each of msg[1][0], msg[1][1], msg[1][2]... is an
argument for the message.

Michael.

On 10/11/05, Phil Kulak <[EMAIL PROTECTED]> wrote:
> Oh yea, that doesn't bother me. The problem I have is that Wicket
> reads from the model on every request to populate the field again, so
> when you have getters that return user types, you end up with that
> type's toString() in the text field, not what the user actually typed.
> I could buffer that in the model, I suppose, and kind of turn it into
> a write-only model.


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to