Yep that's right, in your case (if the class stays like that) you can skip
convertInput. I happened to have a similar situation today. But I also had
the situation where one value gets passed to the form component and there it
gets splitted to two textfields and concatinated afterwards. as igor said,
there it really is very important to override convertInput to split the
values (and onbeforerender to concatinate them again), if you also add
Validators. by the way also be sure check that the value you pass to
setConvertedInput inside of convertInput isn't null as that'd be same as
omitting convertInput ;-)



smallufo wrote:
> 
> 2008/1/12, Igor Vaynberg <[EMAIL PROTECTED]>:
>>
>> first you should implement convertintput() not setconvertedinput().
>> inside your impl of convertinput() you should call setconvertedinput()
>> with the right value.
> 
> 
> Sorry , it's my typo , I meant convertInput() as you mentioned.
> 
> this is indeed important as the converted input is what is passed into
>> validators. so if you need your panel to support validators you will
>> need to implement the method.
>>
>> -igor
>>
> 
> Thank you.
> But I still can add validators as following :
> add(new TextField("year" , new PropertyModel(time , "year")).add(
> NumberValidator.POSITIVE));
> 
> And it still works (including the validator)....
> 
> 


-----
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/FormComponentPanel-and-setConvertedInput%28%29-tp14760809p14762773.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to