> I don't know if this is of any help, but I've written the attached
> utility class that, given a component, can print its containment
> structure, along with the eventual component classes and
> model values (toString-ed).

Well... printDoc and wicket
getDebugSettings().setOutputComponentPath(true); does pretty much the
same thing.

> See jdave-wicket for better test support. Slated to come to you in Wicket 1.5

How can this help me? For example the following is HELL with wicket:

      Integer round = 1;
      String mainFormPath = MarkupUtils.getComponentPath(MainPage.MAIN_TABS,
          TabbedPanel.TAB_PANEL_ID,
          AbstractInnerPanel.INNER_TABS,
          MyWizardPanel.WIZARD_FORM);
      String rowPath =
MarkupUtils.getComponentPath(MyWizardPanel.FANCY_PANEL_ID,
          MyPeriodPanel.HISTORY_CONTAINER,
          MyPeriodPanel.HISTORY_TABLE,
          MyPeriodPanel.PERIODS,
          round.toString());

      // Add row
      tester.executeAjaxEvent(MarkupUtils.getComponentPath(mainFormPath,
          MyWizardPanel.FANCY_PANEL_ID,
          MyPeriodPanel.HISTORY_CONTAINER,
          MyPeriodPanel.BUTTON_CONTAINER,
          MyPeriodPanel.NEW_BUTTON), "onclick");

      // Fill entry
      FormTester formTester =
tester.newFormTester(MarkupUtils.getComponentPath(mainFormPath));
      formTester.setValue(MarkupUtils.getComponentPath(rowPath,
          HistoryEditorTable.START_DATE), "26.1.2008");
      formTester.setValue(MarkupUtils.getComponentPath(rowPath,
          HistoryEditorTable.DAYS), "5");
      formTester.select(MarkupUtils.getComponentPath(rowPath,
          HistoryEditorTable.SETTING), 1);


**
Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to