Wicket
  1. Wicket
  2. WICKET-4792

wickettester#startcomponent(component) doesn't call oninitialize

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.8, 6.0.0
    • Fix Version/s: 6.2.0, 1.5.9
    • Component/s: None
    • Labels:
      None

      Description

      currently wicketester#startcomponent(component) only executes beforerender which causes onbeforerender to be executed however onInitialize() is missed out .

      beforerender+internalinitialize will be a good behavior..

      thanks !

        Activity

        Hide
        vineet semwal added a comment -

        there is still a bug in this method in my opinion,my apology for responding late,i didn't use this method in long time and i do it mechanically what this method does when there is a need...
        ok here is the problem ,since this method doesn't do/go_through a normal processRequestAndDetach() ,i think it's good to do a component#detach() in the end in this method else problems can be the component's requestFlags will get cached and so the behavior will not be expected foreg. on next tester#startcomponent(component) ,the component's configure() and beforerender() won't work as expected ie. onconfigure() and onbeforerender() won't be called..

        thanks

        Show
        vineet semwal added a comment - there is still a bug in this method in my opinion,my apology for responding late,i didn't use this method in long time and i do it mechanically what this method does when there is a need... ok here is the problem ,since this method doesn't do/go_through a normal processRequestAndDetach() ,i think it's good to do a component#detach() in the end in this method else problems can be the component's requestFlags will get cached and so the behavior will not be expected foreg. on next tester#startcomponent(component) ,the component's configure() and beforerender() won't work as expected ie. onconfigure() and onbeforerender() won't be called.. thanks
        Hide
        vineet semwal added a comment -

        you can additionally do tester.getrequestcycle().detach() if you want the behavior to be closer to tester#startcomponntinpage(component) which i think should be in my opinion ..

        Show
        vineet semwal added a comment - you can additionally do tester.getrequestcycle().detach() if you want the behavior to be closer to tester#startcomponntinpage(component) which i think should be in my opinion ..
        Hide
        vineet semwal added a comment -

        oh silly me ,from user point of view first problem can be just simply solved by creating/passing new instance of component though that is not a good way i think..

        Show
        vineet semwal added a comment - oh silly me ,from user point of view first problem can be just simply solved by creating/passing new instance of component though that is not a good way i think..

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            vineet semwal
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development