by the way this is a bit more dangerous now:
protected void convertInput()
{
setConvertedInput(dateField.getConvertedInput());
}
this goes ok because we visit child post order. and because dateField is a
child it works
But getConvertedInput and convertInput() are called in different flows.
johan
On 7/2/07, ChuckDeal <[EMAIL PROTECTED]> wrote:
Eelco Hillenius wrote:
>
> Good point. I didn't think about getConvertedInput being called
> multiple times. I'm working on a refactoring now. Removing final from
> getConvertedInput wasn't the smartest thing to do it turns out. I'm
> thinking about making that method final again, and instead removing
> final from convert (and rename that to convertInput) and add
> setConvertedInput. You can then override convertInput and call
> setConvertedInput with the new value, and be sure this method will
> only be called once.
>
As it turns out, using getConvertedInput was the best for me either :).
When I was writing a validator for my component, the input was null which
caused it to throw an exception. Upon figuring out why it was throwing
the
ex, I realized that I really wanted my Custom component to defer to the
underlying text box, so I made getInputAsArray return the underlying
TextBox's getInputAsArray and then I overrode convertValue to do what
getConvertedInput was doing before. And since I now have valid data from
getInputAsArray, validators don't cause exceptions.
Chuck
--
View this message in context:
http://www.nabble.com/Use-getConverterInput-rather-than-updateModel-in-FormComponentPanel-tf3873952.html#a11399774
Sent from the Wicket - User mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user