Greetings ,
I have placed a TextField and a Link(Html submit button) in my page.I
want to get the value of the TextField when the button is
pressed(onClick()).
But in the following code, I dont get the value the user typed in.
What I am doing wrong?
My HTML is:
<div class="comment"> Search Nihonbare:
<input wicket:id="txtSearchQuery" type="text" name="search"
class="search" />
<input wicket:id="searchButton" type="submit" value="Search"
class="submit" />
</div>
Java Code:
final TextField queryText=new TextField("txtSearchQuery",new
Model<String>(""));
add(queryText);
add(new Link("advancedSearchPage") {
@Override
public void onClick() {
setResponsePage(new SearchResultsPage());
}
});
add(new Link("searchButton") {
@Override
public void onClick() {
System.out.println("QUERY Text: "+
queryText.getModel().getObject());
}
});
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org