|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.click.control.AbstractControl
org.apache.click.control.Field
org.apache.click.control.Select
org.apache.click.extras.control.CountrySelect
public class CountrySelect
Provides a Country Select control: <select></select>.
| Select |
Option for
each country that has a supported Locale from the side
of the JDK.
Note: Newer versions of the JDK seems to support more Locales.
Obs.: Especially practical for registration forms.
| Field Summary |
|---|
| Fields inherited from class org.apache.click.control.Select |
|---|
dataProvider, defaultOption, multiple, optionList, selectedValues, size, VALIDATE_SELECT_FUNCTION |
| Fields inherited from class org.apache.click.control.Field |
|---|
disabled, error, focus, form, help, label, labelStyle, labelStyleClass, parentStyleClassHint, parentStyleHint, readonly, required, tabindex, title, trim, validate, value |
| Fields inherited from class org.apache.click.control.AbstractControl |
|---|
actionListener, attributes, behaviors, headElements, listener, listenerMethod, messages, name, parent, styles |
| Fields inherited from interface org.apache.click.Control |
|---|
CONTROL_MESSAGES |
| Constructor Summary | |
|---|---|
CountrySelect()
Create a CountrySelect field with no name defined. |
|
CountrySelect(String name)
Create a CountrySelect field with the given name. |
|
CountrySelect(String name,
boolean required)
Create a CountrySelect field with the given name and required status. |
|
CountrySelect(String name,
String label)
Create a CountrySelect field with the given name and label. |
|
CountrySelect(String name,
String label,
boolean required)
Create a CountrySelect field with the given name, label and required status. |
|
CountrySelect(String name,
String label,
Locale locale)
Create a CountrySelect field with the given name, label and locale. |
|
| Method Summary | |
|---|---|
Locale |
getLocale()
Return the locale for this control. |
protected void |
loadOptionList()
Load the Country Select options if not defined, using all the available countries. |
void |
render(HtmlStringBuffer buffer)
Render the HTML representation of the QuerySelect. |
void |
setLocale(Locale locale)
Set the locale of this control to something else than the Context locale. |
void |
validate()
Validate the Select request submission. |
| Methods inherited from class org.apache.click.control.Select |
|---|
add, add, add, add, addAll, addAll, addAll, addAll, bindRequestValue, getControlSizeEst, getDataProvider, getDefaultOption, getDefaultOptionValue, getMultipleValues, getOptionList, getSelectedValues, getSize, getState, getTag, getValidationJavaScript, isMultiple, onRender, setDataProvider, setDefaultOption, setInitialValue, setMultiple, setMultipleValues, setOptionList, setSelectedValues, setSize, setState |
| Methods inherited from class org.apache.click.control.Field |
|---|
getError, getErrorLabel, getFocus, getFocusJavaScript, getForm, getHelp, getId, getLabel, getLabelStyle, getLabelStyleClass, getParentStyleClassHint, getParentStyleHint, getRequestValue, getTabIndex, getTextAlign, getTitle, getValidate, getValue, getValueObject, getWidth, isDisabled, isHidden, isReadonly, isRequired, isTrim, isValid, onProcess, removeState, renderTagBegin, restoreState, saveState, setDisabled, setError, setErrorMessage, setErrorMessage, setFocus, setForm, setHelp, setLabel, setLabelStyle, setLabelStyleClass, setListener, setParent, setParentStyleClassHint, setParentStyleHint, setReadonly, setRequired, setTabIndex, setTextAlign, setTitle, setTrim, setValidate, setValue, setValueObject, setWidth |
| Methods inherited from class org.apache.click.control.AbstractControl |
|---|
addBehavior, addStyleClass, appendAttributes, dispatchActionEvent, getActionListener, getAttribute, getAttributes, getBehaviors, getContext, getHeadElements, getHtmlImports, getMessage, getMessage, getMessages, getName, getPage, getParent, getStyle, getStyles, hasAttribute, hasAttributes, hasBehaviors, hasStyles, isAjaxTarget, onDeploy, onDestroy, onInit, removeBehavior, removeStyleClass, renderTagEnd, setActionListener, setAttribute, setId, setName, setStyle, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CountrySelect(String name)
name - the name of the field
public CountrySelect(String name,
String label)
name - the name of the fieldlabel - the label of the field
public CountrySelect(String name,
boolean required)
name - the name of the fieldrequired - the field required status
public CountrySelect(String name,
String label,
boolean required)
name - the name of the fieldlabel - the label of the fieldrequired - the field required status
public CountrySelect(String name,
String label,
Locale locale)
name - the name of the fieldlabel - the label of the fieldlocale - the Locale of the filedpublic CountrySelect()
| Method Detail |
|---|
public Locale getLocale()
public void setLocale(Locale locale)
Context locale.
locale - the locale to set for this controlContext.getLocale()public void validate()
validate in class SelectSelect.validate()public void render(HtmlStringBuffer buffer)
render in interface Controlrender in class Selectbuffer - the specified buffer to render the control's output toAbstractControl.toString()protected void loadOptionList()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||