[
https://issues.apache.org/jira/browse/WICKET-6502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16300468#comment-16300468
]
Ingo Renner edited comment on WICKET-6502 at 12/21/17 7:30 PM:
---------------------------------------------------------------
Hi,
ok, my fault. Sorry.
I think, I was somewhat overworked that night. The wicket:message was broken in
my implementation before, but I didn't noticed it, because I didn't use one.
After taking the time debugging my problem I found out that there are settings
where I can control the behavior which I didn't knew about. By my
understanding right now, I was wrong and had not seen the whole picture. Wicket
does play well on that part, my implementation and understanding was jumping to
short, if you know what I mean.
Again, I am sorry. Keep up the good work.
Please close this issue, I am to blind to find a way to close it by myself
right now as it seems.
best regards
Ingo
was (Author: inren):
Hi,
ok, my fault. Sorry.
I think, I was somewhat overworked that night. The wicket:message was broken in
my implementation before, but I didn't noticed it, because I didn't use one.
After taking the time debugging my problem I found out that there are settings
where I can control the behavior which I didn't knew about. By my
understanding right now, I was wrong and had not seen the whole picture. Wicket
does play well on that part, my implementation and understanding was jumping to
short, if you know what I mean.
Again, I am sorry. Keep up the good work.
best regards
Ingo
> o.a.w.Localizer and o.a.w.markup.resolver.WicketMessageResolver changed
> behaviour
> ---------------------------------------------------------------------------------
>
> Key: WICKET-6502
> URL: https://issues.apache.org/jira/browse/WICKET-6502
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 8.0.0-M8
> Reporter: Ingo Renner
> Priority: Minor
>
> Hi,
> I did not know about
> Application.get().getResourceSettings().getThrowExceptionOnMissingResource()
> before I implement a Localizer which returns [key] when key could not be
> resolved.
> In another project I use a modified localizer to resolve messages from a
> database and when the key does not exist, the key is written into an other
> database to start the process of creating the messages with their needed
> translations. This worked with wicket 7.x quite well.
> In my play project (where I test the wicket 8M8 upgrade), I just found out
> that in wicket 8M8
> the localizer method
> public String getString(String key, Component component, IModel<?> model,
> Locale locale, String style, IModel<String> defaultValue)
> returns "DEFAULT_WICKET_MESSAGE_RESOLVER_VALUE" instead of the exception,
> when the key could not be resolved. This creates an exception in
> WicketMessageResolver
> public void onComponentTagBody(final MarkupStream markupStream, final
> ComponentTag openTag)
> This is for wicket:message as far as I can see by now.
> I fixed my Localizer variant, no big deal, but I wonder if this is a good
> design decision. The getString methods are defined to throw a
> MissingResourceException if they can't resolve the key in this method,. But
> the exception is not thrown, but instead provokes a WicketRuntimeException in
> another class. I think we should stick with the old behavior and throw the
> exception in the localizer class as defined in the method declaration.
> If you think the new behavior is better, than please give me some explanation
> to make me understand this design decision.
> Best regards,
> Ingo
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)