On Mon, Jun 2, 2008 at 8:01 AM, wenm <[EMAIL PROTECTED]> wrote:
>
> Sure.
>
> Maybe I need to explain more explicitly.
>
> I will get the unique error code from web service if there is something
> wrong. And then I would like to map the error codes to user-friendly
> messages (which are in properties file), and show the messages conditionally
> based on the error type in a label.
>
> For example
> if(error code == 1){
>  add(new Label("a", property.getProperty(key1)));
> } else if (error code ==2){
>  .............
> }
>
> So the first thing is that I have to read the properties file and let the
> property to load it, so I can get the value(the message which I want to
> show).

Have you looked at org.apache.wicket.model.ResourceModel?  You could do:

new Label("a", new ResourceModel(key1))

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

Reply via email to