Hello,
I'm trying to test a component that is added to another component
that is added to the page. For example, I'd like to test the
FeedbackPanel below that is added to the Form which is added to the
page. I'm unsure of how to do this. Any help would be appreciated.
Thanks!
Ryan
public AdvancedSearch() {
add(new TabbedHeader("advancedSearchTabbedHeader"));
Form form = new Form("advancedSearch", new
CompoundPropertyModel(this));
add(form);
//feedbackPanel
FeedbackPanel feedbackPanel = new FeedbackPanel
("feedbackPanel");
feedbackPanel.add(new AttributeModifier("class", true, new
Model("feedbackPanel")));
feedbackPanel.setFilter(new ContainerFeedbackMessageFilter
(form));
form.add(feedbackPanel);
public void testDisplayAdvancedSearch(){
//create a tester and go to acknowledgements
WicketTester tester = new WicketTester(new CnvApplication());
tester.startPage(AdvancedSearch.class);
//check to make sure all components exist with correct names
and types
tester.assertComponent("advancedSearchTabbedHeader",
TabbedHeader.class);
FormTester formTester = tester.newFormTester("advancedSearch");
//*****tester.assertComponent("feedbackPanel",
FeedbackPanel.class);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]