Questions et réponses d'entretien les plus demandées et tests en ligne
Plateforme d'apprentissage pour la preparation aux entretiens, les tests en ligne, les tutoriels et la pratique en direct

Developpez vos competences grace a des parcours cibles, des tests blancs et un contenu pret pour l'entretien.

WithoutBook rassemble des questions d'entretien par sujet, des tests pratiques en ligne, des tutoriels et des guides de comparaison dans un espace d'apprentissage reactif.

Preparation a l'entretien

Apache Wicket Questions et reponses d'entretien

Question 16. How to create single selected ListBox?

// single list choice
private static final List<String> FRUITS = Arrays.asList(new String[] { "Apple", "Orange", "Banana" });
ListChoice<String> listFruits = new ListChoice<String>("fruit", new PropertyModel<String>(this, "selectedFruit"), FRUITS);
 
listFruits.setMaxRows(5);

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Question 17. How to create multiple selected ListBox in apache-wicket?

//choices in list box
private static final List<String> NUMBERS = Arrays.asList(new String[] {"Number 1", "Number 2", "Number 3", "Number 4", "Number 5", "Number 6" });
//variable to hold the selected multiple values from listbox, 
//and make "Number 6" selected as default value
private ArrayList<String> selectedNumber = new ArrayList<String>(
Arrays.asList(new String[] { "Number 6" }));
 
ListMultipleChoice<String> listNumbers = new ListMultipleChoice<String>(
"number", new Model(selectedNumber), NUMBERS);
 
//HTML for multiple select listbox
<select wicket:id="number"></select>

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Question 18. How to create DropDown Choice in apache-wicket?

//Java 
import org.apache.wicket.markup.html.form.DropDownChoice;
...
//choices in dropdown box
private static final List<String> SEARCH_ENGINES = Arrays.asList(new String[] {
"Google", "Bing", "Baidu" });
 
//variable to hold the selected value from dropdown box,
//and also make "Google" is selected by default
private String selected = "Google";
 
DropDownChoice<String> listSites = new DropDownChoice<String>(
"sites", new PropertyModel<String>(this, "selected"), SEARCH_ENGINES);
 
//HTML for dropdown box
<select wicket:id="sites"></select>

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Question 19. How to create FileUpload field in apache-wicket?

//Java
import org.apache.wicket.markup.html.form.upload.FileUploadField;
 
form.setMultiPart(true);
form.add(fileUpload = new FileUploadField("fileUpload"));
 
//HTML
<input wicket:id="fileUpload" type="file"/>

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Question 20. How to create Select Option as menu wise in apache-wicket?

//Java 
import org.apache.wicket.extensions.markup.html.form.select.Select;
import org.apache.wicket.extensions.markup.html.form.select.SelectOption;
...
        //variable to hold the selected value from dropdown box,
        //and also make "jQuery" selected by default
        private String selected = "jQuery";
 
Select languages = new Select("languages", new PropertyModel<String>(this, "selected"));
form.add(languages);
languages.add(new SelectOption<String>("framework1", new Model<String>("Wicket")));
languages.add(new SelectOption<String>("framework2", new Model<String>("Spring MVC")));
languages.add(new SelectOption<String>("framework3", new Model<String>("JSF 2.0")));
languages.add(new SelectOption<String>("Script1", new Model<String>("jQuery")));
languages.add(new SelectOption<String>("Script2", new Model<String>("prototype")));
 
//HTML for dropdown box
<select wicket:id="languages">
<optgroup label="Frameworks">
<option wicket:id="framework1" >Wicket (1.4.7)</option>
<option wicket:id="framework2" >Spring MVC (3.0)</option>
<option wicket:id="framework3" >JSF (2.0)</option>
</optgroup>
<optgroup label="JavaScript">
<option wicket:id="Script1" >jQuery (1.6.1)</option>
<option wicket:id="Script2" >prototype (1.7)</option>
</optgroup>
</select>

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Les plus utiles selon les utilisateurs :

Copyright © 2026, WithoutBook.