Hey
I'm using a Stringresourcemodel to display a custom message label. Its
constructed like this.
new Label("maxAmount", new
StringResourceModel("bookkeeping.amount.to.move",null, new Object[]{
new PropertyModel(this, "valueReport.lastValuationDate"),
new PropertyModel(this, "valueReport.totalValueLocal"),
new
PropertyModel(getCurrentSelections().getSelectedLegalEntity(),
"bookkeepingCurrency")
})));
With the following entry in a property file
bookkeeping.amount.to.move=Booked value per {0,date} is {1,number,###.##}
{2}
My problem is that the valuereport object is not populated before the user
makes a choice on the page. So my label is showing like this
Booked value per null is null DKK
When i try to use "" as default value in the constructor i get a conversion
error.
Caused by: java.lang.IllegalArgumentException: Cannot format given Object
as a Date
Anybody got any ideas?
Med venlig hilsen / Best regards
Tommy Sadiq Hinrichsen