Wicket
  1. Wicket
  2. WICKET-3764

Ajax behaviors are failing in stateless pages

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5-RC4
    • Fix Version/s: 1.5-RC5
    • Component/s: wicket
    • Labels:
      None

      Description

      Stateless ajax behaviors are not working in stateless pages in 1.5-RC4.2. I verified it with the stateless demo project of Martin Grigorov (https://github.com/martin-g/wicket-stateless), when changing the dropdown on the start page an exception is thrown (clicking the increment link causes a similar exception):

      org.apache.wicket.behavior.InvalidBehaviorIdException: Cannot find behavior with id: 0 on component: [DropDownChoice [Component id = c]]

      At first glance the reason may be located in org.apache.wicket.Behaviors.getBehaviorById() which does not create the ID list if missing (getBehaviorsIdList(false) in line 286 instead of getBehaviorsIdList(true)), because this error does not occur when getBehaviorId() was manually called in the page constructor to force creation of the list.

      1. WICKET-3764.patch
        3 kB
        Martin Grigorov

        Activity

        Martin Grigorov made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Fix Version/s 1.5-RC5 [ 12316423 ]
        Resolution Fixed [ 1 ]
        Martin Grigorov made changes -
        Resolution Won't Fix [ 2 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Assignee Igor Vaynberg [ ivaynberg ] Martin Grigorov [ mgrigorov ]
        Igor Vaynberg made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]
        Martin Grigorov made changes -
        Assignee Martin Grigorov [ mgrigorov ] Igor Vaynberg [ ivaynberg ]
        Martin Grigorov made changes -
        Attachment WICKET-3764.patch [ 12481339 ]
        Igor Vaynberg made changes -
        Field Original Value New Value
        Assignee Martin Grigorov [ mgrigorov ]
        Heribert Hirth created issue -

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Heribert Hirth
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development