Bugs item #1416582, was opened at 2006-01-27 17:05
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1416582&group_id=119783

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: 1.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Martijn Dashorst (dashorst)
Assigned to: Juergen Donnerstag (jdonnerstag)
Summary: Resource loading caches wrong

Initial Comment:
When I have two dropdowns, each with a different null
value loaded from a resource bundle, it will always
return the first one found.

MyPage.properties:
form.drop1.null=Value 1
form.drop2.null=Value 2

MyPage.java:
public class MyPage extends WebPage {
MyPage() {
    String[] options = {"foo", "bar"};
    Form f = new Form("form");
    f.add(new DropDownChoice("drop1",
Arrays.asList(options)).setNullValid(true));
    f.add(new DropDownChoice("drop2",
Arrays.asList(options)).setNullValid(true));
    add(f);
}

TestCase:
MyMockPage page = new MyMockPage();
Application app = Application.get();
app
    .getResourceSettings()
    .addStringResourceLoader(
        new ComponentStringResourceLoader(app));

Localizer localizer = 
    app.getResourceSettings().getLocalizer();

String drop1 = 
    localizer.getString("null", page.drop1, "");
String drop2 = 
    localizer.getString("null", page.drop2, "");

assertFalse(drop1.equals(drop2));


I have created a testcase for this, and checked it into
core.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1416582&group_id=119783


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to