actually the check you should be doing is: if (obj instanceof imodel) { return ((imodel)obj.getobject()).tostring(); }
that is the model contract and that is how it is used properly. -igor On 10/17/07, Jan Kriesten <[EMAIL PROTECTED]> wrote: > > 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]