In my unit test code I use:
<dependency>
<groupId>com.googlecode.londonwicket</groupId>
<artifactId>wicket-component-expressions</artifactId>
<version>0.2.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>org.apache.wicket</artifactId>
<groupId>wicket</groupId>
</exclusion>
</exclusions>
</dependency>
Or see:
http://code.google.com/p/londonwicket/source/browse/repo/com/googlecode/lond
onwicket/wicket-component-expressions/?r=61#wicket-component-expressions%2F0
.2.0
They are a group of Wicket users from London and their two static method
tool allows you to use regexp in the component path as well as filtering by
a component type such as a TextBox and its model such as
Model<String>("Hello World").
I don't think the new version of Wicket has this flexibility build in
WicketTester, but looking over the code of
BaseWicketTester#getComponentFromLastRenderedPage() and
BaseWicketTester#debugComponentTrees() you can implement your own method to
iterate through the component tree and return a reference to the component
you want.
~ Thank you,
Paul Bors
-----Original Message-----
From: arkadyz111 [mailto:[email protected]]
Sent: Monday, August 13, 2012 9:41 AM
To: [email protected]
Subject: Is there a way to search component by its wicket ID ?
Hello, team.
I am looking for a way to locate component by its wicket id in markup
container. But I see only option to search by "path" is supported.
Do I miss something ?
Thank you.
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Is-there-a-way-to-search-componen
t-by-its-wicket-ID-tp4651175.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]