You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Gwyn Evans <gw...@gmail.com> on 2007/09/26 13:32:09 UTC

WickeMessage functionality check?

Anyone got a couple of mins to check WicketMessageResolver?

It looks to me as if
WicketMessageResolver$MessageLabel.onComponentTagBody()
would support

  <wicket:message>key</wicket:message>

albeit with a debug warning, by using 'key' as the key, but it
doesn't, as before it gets to that part of the code, it's been
intercepted by an earlier trap in resolve() that throws
MarkupException( "Wrong format of <wicket:message key='xxx'>:
attribute 'key' is missing");

Any thoughts as to what the correct behaviour should be?

-- 
Best regards,
 Gwyn                          mailto:gwyn.evans@gmail.com


Re: WickeMessage functionality check?

Posted by Gwyn Evans <gw...@gmail.com>.
Possibly, although it does allow you to see on the rendered page just
what properties didn't get found, rather than just the log file!

Mainly though I'm concerned about trying to find out if I'm missing
something or have we really got unreachable code in WicketMessageResolver?

/Gwyn

On Wednesday, September 26, 2007, 12:41:58 PM, Martijn <ma...@gmail.com> wrote:

> I think the proper use should be:

> <wicket:message key='xxx'>Default value</wicket:message>

> Where the default value would be rendered if no message bundle was found.

> Providing a key inside the tags is not very intuitive IMO.

> Martijn

> On 9/26/07, Gwyn Evans <gw...@gmail.com> wrote:
>> Anyone got a couple of mins to check WicketMessageResolver?
>>
>> It looks to me as if
>> WicketMessageResolver$MessageLabel.onComponentTagBody()
>> would support
>>
>>   <wicket:message>key</wicket:message>
>>
>> albeit with a debug warning, by using 'key' as the key, but it
>> doesn't, as before it gets to that part of the code, it's been
>> intercepted by an earlier trap in resolve() that throws
>> MarkupException( "Wrong format of <wicket:message key='xxx'>:
>> attribute 'key' is missing");
>>
>> Any thoughts as to what the correct behaviour should be?



Re: WickeMessage functionality check?

Posted by Martijn Dashorst <ma...@gmail.com>.
I think the proper use should be:

<wicket:message key='xxx'>Default value</wicket:message>

Where the default value would be rendered if no message bundle was found.

Providing a key inside the tags is not very intuitive IMO.

Martijn

On 9/26/07, Gwyn Evans <gw...@gmail.com> wrote:
> Anyone got a couple of mins to check WicketMessageResolver?
>
> It looks to me as if
> WicketMessageResolver$MessageLabel.onComponentTagBody()
> would support
>
>   <wicket:message>key</wicket:message>
>
> albeit with a debug warning, by using 'key' as the key, but it
> doesn't, as before it gets to that part of the code, it's been
> intercepted by an earlier trap in resolve() that throws
> MarkupException( "Wrong format of <wicket:message key='xxx'>:
> attribute 'key' is missing");
>
> Any thoughts as to what the correct behaviour should be?
>
> --
> Best regards,
>  Gwyn                          mailto:gwyn.evans@gmail.com
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/