I have my string variable I want to display
final String wrongPw = "Wrong Password";
My AJAX yes button:
AjaxButton yesButton = new AjaxButton("yesButton", yesNoForm) {
private static final long serialVersionUID = -3827487963204274386L;
@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
if (target != null && password.equals(getPw())) {
answer.setAnswer(true);
modalWindow.close(target);
}else if(target != null && !password.equals(getPw())){
answer.setAnswer(false);
wrongPW.setVisible(true);
}
}
};
Further down:
wrongPW.setVisible(false);
add(wrongPW);
When I hit the yes button I must refresh the page for the wrongPW
to display.
How can this be done dynamically?