Related differences

Ques 11. How to create a password field in apache-wicket?

//create a password field
final PasswordTextField password = new PasswordTextField("password", Model.of(""));
//for properties file
password.setLabel(Model.of("Password")); 

Is it helpful? Add Comment View Comments
 

Ques 12. How to create a TextArea in apache-wicket?

//create a textarea field for address
final TextArea<String> address = new TextArea<String>("address",Model.of(""));
address.setRequired(true);

Is it helpful? Add Comment View Comments
 

Ques 13. How to create checkbox in apache-wicket?

final CheckBox chk0 = new CheckBox("checkbox0", Model.of(Boolean.TRUE));
 
final CheckBox chk1 = new CheckBox("checkbox1",
new PropertyModel<Boolean>(this, "checkbox1"));

final CheckBox chk2 = new CheckBox("checkbox2",
new PropertyModel<Boolean>(this, "checkbox2"));

Is it helpful? Add Comment View Comments
 

Ques 14. How to create multiple checkboxes in apache-wicket?

private static final List<String> LANGUAGES = Arrays.asList(new String[] {"Java", ".NET", "PHP", "Python", "C/C++" });
// hold the checkbox values
private ArrayList<String> languagesSelect = new ArrayList<String>();
final CheckBoxMultipleChoice<String> listLanguages = new CheckBoxMultipleChoice<String>("languages", new Model(languagesSelect), LANGUAGES);

Is it helpful? Add Comment View Comments
 

Ques 15. How to create Radio button in apache-wicket?

//choices in radio button
private static final List<String> TYPES = Arrays.asList(new String[] { "Shared Host", "VPN", "Dedicated Server" });

RadioChoice<String> hostingType = new RadioChoice<String>("hosting", new PropertyModel<String>(this, "selected"), TYPES);

Is it helpful? Add Comment View Comments
 

Most helpful rated by users: