If you are using the included XML noise configuration system, Select modules can be declared as
<select falloff="falloff" threshold="threshold" >
<lower source module />
<upper source module />
<selector module />
</select>
The following features are supported:
The following features are supported:
A class representing a selection of items the user has selected in a UI. The set of choices is presented as a set of {@link com.vaadin.data.Item}s in a {@link com.vaadin.data.Container}.
A Select
component may be in single- or multiselect mode. Multiselect mode means that more than one item can be selected simultaneously.
Both 'select' and 'prioritySelect' methods come in two flavours - blocking, which wait till a value is available in a channel, and messaging, which send out a message to the specified message handler, as soon as a message is available. Optionally, all methods allow the user to specify a boolean mask, assigning each select 's input channel a flag indicating, whether it should be included in the select operation. This is useful when handling state to selectively block some inputs in some states.
@author Vaclav PechDate: 30th Sep 2010Copyright (c) Xoetrope Ltd., 2002-2006
$Revision: 1.1 $
License: see License.txt
We use our super's target
property as the default target.
@version $Id: Select.java 386056 2006-03-15 11:31:56Z tcurdt $
@author M. Dahm
@see LOOKUPSWITCH
@see TABLESWITCH
@see InstructionList
public MyPage extends Page { private Select mySelect; public MyPage() { mySelect = new Select("mySelect"); mySelect.add("YES"); mySelect.add("NO"); } public void onRender() { // Only specify a default value if the current value is null if (mySelect.getValue() == null) { mySelect.setValue("YES"); } } }@see Option @see OptionGroup
<select>
box. Elements are provided by one or more SelectOptions
components in the hierarchy below the Select
component. Advantages to the standard choice components is that the user has a lot more control over the markup between the <select> tag and its children <option> tags: allowing for such things as <optgroup> tags. Example HTML:
<select wicket:id="select" multiple="multiple"> <wicket:container wicket:id="options"> <option wicket:id="option">Option Label</option> </wicket:container> </select>Related Java Code:
Select select = new Select("select", selectionModel); add(select); SelectOptions options = new SelectOptions("options", elements, renderer); select.add(options);Note that you don't need to add component(s) for the <option> tag - they are created by SelectOptions
Note: due to the usage of a SelectOption for each <option> the memory footprint of the page will grow with the number of <option>s you need. Consider using {@link org.apache.wicket.markup.html.form.DropDownChoice} component if it is able to fulfill yourrequirements.
@see SelectOption @see SelectOptions @see org.apache.wicket.markup.html.form.DropDownChoice @author Igor Vaynberg @param < T>Select class.
@author dgreen @version $Id: $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|