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

StatelessLink not working

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.25.0
    • 7.6.0, 8.0.0-M4, 6.26.0
    • wicket
    • None

    Description

      Example:

      TestPage.html
      <?xml version="1.0" encoding="UTF-8"?>
      <html xmlns:wicket="http://wicket.apache.org/">
      <body>
          <a wicket:id="statelessLink">statelessLink</a>
          <a wicket:id="statefullLink">statefullLink</a>
      </body>
      </html>
      
      TestPage.java
      public class TestPage extends WebPage {
          public TestPage(PageParameters pageParameters) {
              super(pageParameters);
              add(new StatelessLink("statelessLink") {
                  @Override
                  public void onClick() {
                      System.err.println("statelessLink.onClick()");
                  }
              });
              add(new Link("statefullLink") {
                  @Override
                  public void onClick() {
                      System.err.println("statefullLink.onClick()");
                  }
              });
          }
          @Override
          protected void onBeforeRender() {
              get("statefullLink").setVisible(false);
              super.onBeforeRender();
          }
      }
      

      So, StatelessLink not working in this case.
      And if i remove the row get("statefullLink").setVisible(false); it works succesfull.

      Attachments

        1. wicketerror.zip
          59 kB
          Dmitry Malyshev

        Issue Links

          Activity

            People

              pedrosans Pedro Santos
              barbazan Dmitry Malyshev
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: