Hey Igor,
Works for now, but i had to print to figure out the path of component ...
just wondering if there is a cleaner way to get the component Path ... may
be something that i am not aware of ?

Thanks on the DDChoice though. appreciate it.



On Fri, Mar 14, 2008 at 6:26 AM, lars vonk <[EMAIL PROTECTED]> wrote:

> Perhaps there is a smarter way, but something like this should work:
>
> DropDownChoice ddc = (DropDownChoice)
> wicketTester.getComponentFromLastRenderedPage("path:to:dropDownChoice");
> List choices = ddc.getChoices().
>
> do assertions on choices.
>
> Lars
>
> On Fri, Mar 14, 2008 at 5:09 AM, Ricky <[EMAIL PROTECTED]> wrote:
>
> > I need to test drop down values in a list using WicketTester ... like is
> > there wicketTester.assertXXX or something that i could use ? I tried
> > getTagByWicketId("some_thing_").getValue() but it only gives me the HTML
> > for
> > it ...
> >
> > my drop down is something like
> >
> > add(dChoice = new DropDownChoice("someModelClassChoice",new
> > CompoundPropertyModel(SomeModelClass.class),
> > Arrays.<String>asList("MODEL0","MODEL1","MODEL2")){
> >
> >            @Override
> >            protected boolean wantOnSelectionChangedNotifications() {
> >                return true;
> >
> >            }
> >
> >            @Override
> >            protected void onSelectionChanged(Object newSelection) {
> >                System.out.println(" Something happened");
> >                params.put("Selected", newSelection);
> >                setResponsePage(new WelcomePage(params));
> >
> >            }
> >        });
> >
> > My apologies if the question is a little dumb ...
> >
> > Regards
> > Vyas, Anirudh
> > || ॐ ||
> >
>



-- 

Regards
Vyas, Anirudh
|| ॐ ||

Reply via email to