Yes, but you were relying on an implementation detail which was in no way promised to remain stable. You should not have done that and you got properly burned. It's like when you call one of these public methods which are marked as "not part of the Wicket API, don't call this". What my question was aimed at was more finding out whether the doc specifies anything about the return value of StringResourceModel.toString().
Thomas > -----Original Message----- > From: Jan Kriesten [mailto:[EMAIL PROTECTED] > Sent: Mittwoch, 17. Oktober 2007 12:07 > To: [email protected] > Subject: Re: StringResourceModel toString() changed in Beta4 > - why??? Must use getString() now. > > > Hi Thomas, > > > The javadoc pretty clearly says that this is "useful for > debugging and > > so on...". What lead you to believe this would always return a > > user-readable string? > > actually, I stumbled over this, too. I used StringResourceModel for > IChoiceRenderer- and IOptionRenderer-Lists (where one assumes > String within getDisplayValue/getIdValue). Now I have to do an > > if( obj instanceof StringResourceModel ) > return( ((StringResourceModel) obj).getString() ); > > whereas for all other cases I just return 'toString()'. > > This wasn't a nice surprise actually. > > Regards, --- Jan. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
