Re: [Wicket-user] Examples of model decorators

2006-03-17 Thread Johan Compagner
you could also use youre own converter for this.On 3/16/06, Frank Silbermann <[EMAIL PROTECTED]
> wrote:


















Are there any examples of model decorators
I could look at?  I have a model that
consists of one of several code values, and I would like a label to
automatically display a text string associated with the code value.









Re: [Wicket-user] Examples of model decorators

2006-03-16 Thread Igor Vaynberg
not really sure what you mean...but here is a simple decorator that does uppercase on the model object, assuming of course its a string.class UpperCaseModel implements IModel {   private IModel delegate;
     public UpperCaseModel(IModel delegate) { this.delegate=delegate; }      Object getObject(Component c) { return ((String)delegate.getObject(c)).toUpperCase(); }   void setObject(Component c, Object o) { 
delegate.setObject(c, o); }   void detach() { delegate.detach(); }   IModel getNestedModel() { return null; }}hope this helps,-IgorOn 3/16/06, 
Frank Silbermann <[EMAIL PROTECTED]> wrote:



















Are there any examples of model decorators
I could look at?  I have a model that
consists of one of several code values, and I would like a label to
automatically display a text string associated with the code value.









[Wicket-user] Examples of model decorators

2006-03-16 Thread Frank Silbermann








Are there any examples of model decorators
I could look at?  I have a model that
consists of one of several code values, and I would like a label to
automatically display a text string associated with the code value.