Reputation: 94
I'm not familiar with wicket.
I want to get value of input in html page and convert it to a string and work on it in java mode, but I don't know how to do it.
Any help would be appreciated.
Upvotes: 0
Views: 3171
Reputation: 85
For example:
PasswordTextField ptf = new PasswordTextField("password", Model.of(""));
Form form = new Form("exampleForm"){
@Override
public void onSubmit() {
System.out.print(ptf.getModelObject());
}
}
form.add(ptf);
So When u submit the form - you get get submitted value from Password Text Field by calling getModelObject() method on textField object.
Upvotes: 1
Reputation: 17503
You can use Wicket Examples Echo application as inspiration:
Demo: http://examples7x.wicket.apache.org/echo
Upvotes: 1