[
https://issues.apache.org/jira/browse/WICKET-4085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13115488#comment-13115488
]
Pranav Kacholia commented on WICKET-4085:
-----------------------------------------
I think i misunderstood Martin's comments. I will answr them one by one here
1) session locale: It takes a format object. This is an abstract class that is
subclassed by a classes like Numberformat, dateformat, decimalformat etc, which
can all be set to the current locale.
2)no tests: I dont see how you can test anything really. It is a direct copy
from the label class which also has no tests.
3) I have editted the error handling to remove the rethrow of NPE.
4) The illegalargumentexceptino is thrown when the supplied formatter is not
the right one for the underlying object it is trying to format. Maybe someone
can give a suggestion as to what would be the best way to handle this exception
that is consistent with wicket.
5) The average use case is going to be where you want to display a simple
string that is formatted. Why do we need to supply a StringResourceModel which
then requires a formatted property file. Imagine a situation where you want to
display a date. Why not just have a label with a DateFormat object. (Which
handles locale).
> Formatted label component
> -------------------------
>
> Key: WICKET-4085
> URL: https://issues.apache.org/jira/browse/WICKET-4085
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.5.0, 1.5.1
> Reporter: Pranav Kacholia
> Priority: Trivial
> Attachments: FormattedLabel.patch
>
>
> A component that can be used to display formatted text. Especially numbers
> example Currency.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira