Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-742

StringResourceModel makes 3 calls to IStringResourceLoader

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 1.3.0-beta2
    • 1.3.0-beta2
    • wicket
    • None
    • Windows XP, JDK 1.4

    Description

      When using StringResourceModel, the class IStringResourceLoader is being called 3 times.

      Here is an example to how to trigger the error:

      CLASS: TestPage.java
      public class TestPage extends WebPage {
      public TestPage()

      { StringResourceModel model = new StringResourceModel("myresourcekey", this, null); add(new Label("label", model)); }

      }

      MARKUP:TestPage.html
      <html>
      <head>
      <title>Test Page</title>
      </head>
      <body>
      <h1>This is a test page...</h1>
      <span wicket:id="label"></span>
      </body>
      </html>

      PROPERTY FILE:TestPage.properties
      myresourcekey=label

      Add a breakpoint in the wicket class ComponentStringResourceLoader.public String loadStringResource(final Component component, final String key)
      Trigger the webpage and you will see it be triggered 3 times.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mk3dk Murat YĆ¼cel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: