private static SelectItem cloneSelectItem(SelectItem o) { SelectItem copy = new SelectItem(); String description = o.getDescription(); if (description != null) copy.setDescription(new String(description)); copy.setDisabled(o.isDisabled()); copy.setEscape(o.isEscape()); String label = o.getLabel(); if (label != null) copy.setLabel(new String(label)); copy.setNoSelectionOption(o.isNoSelectionOption()); copy.setValue(o.getValue()); return copy; } }
/** * <p>Construct a <code>SelectItem</code> instance with the specified * property values.</p> * * @param value Value to be delivered to the model if this * item is selected by the user * @param label Label to be rendered for this item in the response * @param description Description of this item, for use in tools * @param disabled Flag indicating that this option is disabled * @param escape Flag indicating that the text of this option should be * escaped when rendered. * @param noSelectionOption Flag indicating that the current option is a "no selection" option * @since 1.2 */ public SelectItem(Object value, String label, String description, boolean disabled, boolean escape, boolean noSelectionOption) { super(); setValue(value); setLabel(label); setDescription(description); setDisabled(disabled); setEscape(escape); setNoSelectionOption(noSelectionOption); }
/** * <p>Construct a <code>SelectItem</code> instance with the specified * property values.</p> * * @param value Value to be delivered to the model if this * item is selected by the user * @param label Label to be rendered for this item in the response * @param description Description of this item, for use in tools * @param disabled Flag indicating that this option is disabled * @param escape Flag indicating that the text of this option should be * escaped when rendered. * @param noSelectionOption Flag indicating that the current option is a "no selection" option * @since 1.2 */ public SelectItem(Object value, String label, String description, boolean disabled, boolean escape, boolean noSelectionOption) { super(); setValue(value); setLabel(label); setDescription(description); setDisabled(disabled); setEscape(escape); setNoSelectionOption(noSelectionOption); }
/** * <p>Construct a <code>SelectItem</code> instance with the specified * property values.</p> * * @param value Value to be delivered to the model if this * item is selected by the user * @param label Label to be rendered for this item in the response * @param description Description of this item, for use in tools * @param disabled Flag indicating that this option is disabled * @param escape Flag indicating that the text of this option should be * escaped when rendered. * @param noSelectionOption Flag indicating that the current option is a "no selection" option * @since 1.2 */ public SelectItem(Object value, String label, String description, boolean disabled, boolean escape, boolean noSelectionOption) { super(); setValue(value); setLabel(label); setDescription(description); setDisabled(disabled); setEscape(escape); setNoSelectionOption(noSelectionOption); }
/** * <p>Construct a <code>SelectItem</code> instance with the specified * property values.</p> * * @param value Value to be delivered to the model if this * item is selected by the user * @param label Label to be rendered for this item in the response * @param description Description of this item, for use in tools * @param disabled Flag indicating that this option is disabled * @param escape Flag indicating that the text of this option should be * escaped when rendered. * @param noSelectionOption Flag indicating that the current option is a "no selection" option * @since 1.2 */ public SelectItem(Object value, String label, String description, boolean disabled, boolean escape, boolean noSelectionOption) { super(); setValue(value); setLabel(label); setDescription(description); setDisabled(disabled); setEscape(escape); setNoSelectionOption(noSelectionOption); }
/** * <p>Construct a <code>SelectItem</code> instance with the specified * property values.</p> * * @param value Value to be delivered to the model if this * item is selected by the user * @param label Label to be rendered for this item in the response * @param description Description of this item, for use in tools * @param disabled Flag indicating that this option is disabled * @param escape Flag indicating that the text of this option should be * escaped when rendered. * @param noSelectionOption Flag indicating that the current option is a "no selection" option * @since 1.2 */ public SelectItem(Object value, String label, String description, boolean disabled, boolean escape, boolean noSelectionOption) { super(); setValue(value); setLabel(label); setDescription(description); setDisabled(disabled); setEscape(escape); setNoSelectionOption(noSelectionOption); }
/** * <p>Construct a <code>SelectItem</code> instance with the specified * property values.</p> * * @param value Value to be delivered to the model if this * item is selected by the user * @param label Label to be rendered for this item in the response * @param description Description of this item, for use in tools * @param disabled Flag indicating that this option is disabled * @param escape Flag indicating that the text of this option should be * escaped when rendered. * @param noSelectionOption Flag indicating that the current option is a "no selection" option * @since 1.2 */ public SelectItem(Object value, String label, String description, boolean disabled, boolean escape, boolean noSelectionOption) { super(); setValue(value); setLabel(label); setDescription(description); setDisabled(disabled); setEscape(escape); setNoSelectionOption(noSelectionOption); }
/** * <p>Construct a <code>SelectItem</code> instance with the specified * property values.</p> * * @param value Value to be delivered to the model if this * item is selected by the user * @param label Label to be rendered for this item in the response * @param description Description of this item, for use in tools * @param disabled Flag indicating that this option is disabled * @param escape Flag indicating that the text of this option should be * escaped when rendered. * @param noSelectionOption Flag indicating that the current option is a "no selection" option * @since 1.2 */ public SelectItem(Object value, String label, String description, boolean disabled, boolean escape, boolean noSelectionOption) { super(); setValue(value); setLabel(label); setDescription(description); setDisabled(disabled); setEscape(escape); setNoSelectionOption(noSelectionOption); }
/** * <p>Construct a <code>SelectItem</code> instance with the specified * property values.</p> * * @param value Value to be delivered to the model if this * item is selected by the user * @param label Label to be rendered for this item in the response * @param description Description of this item, for use in tools * @param disabled Flag indicating that this option is disabled * @param escape Flag indicating that the text of this option should be * escaped when rendered. * @param noSelectionOption Flag indicating that the current option is a "no selection" option * @since 1.2 */ public SelectItem(Object value, String label, String description, boolean disabled, boolean escape, boolean noSelectionOption) { super(); setValue(value); setLabel(label); setDescription(description); setDisabled(disabled); setEscape(escape); setNoSelectionOption(noSelectionOption); }
/** * <p>Construct a <code>SelectItem</code> instance with the specified * property values.</p> * * @param value Value to be delivered to the model if this * item is selected by the user * @param label Label to be rendered for this item in the response * @param description Description of this item, for use in tools * @param disabled Flag indicating that this option is disabled * @param escape Flag indicating that the text of this option should be * escaped when rendered. * @param noSelectionOption Flag indicating that the current option is a "no selection" option * @since 1.2 */ public SelectItem(Object value, String label, String description, boolean disabled, boolean escape, boolean noSelectionOption) { super(); setValue(value); setLabel(label); setDescription(description); setDisabled(disabled); setEscape(escape); setNoSelectionOption(noSelectionOption); }
private static SelectItem toSelectItem(UISelectItem option) { SelectItem item = (SelectItem) option.getValue(); if (item == null) { item = new SelectItem(); item.setDescription(option.getItemDescription()); item.setDisabled(option.isItemDisabled()); item.setEscape(option.isItemEscaped()); item.setLabel(option.getItemLabel()); item.setNoSelectionOption(option.isNoSelectionOption()); item.setValue(option.getItemValue()); } return item; }
private static SelectItem toSelectItem(UISelectItem option) { SelectItem item = (SelectItem) option.getValue(); if (item == null) { item = new SelectItem(); item.setDescription(option.getItemDescription()); item.setDisabled(option.isItemDisabled()); item.setEscape(option.isItemEscaped()); item.setLabel(option.getItemLabel()); item.setNoSelectionOption(option.isNoSelectionOption()); item.setValue(option.getItemValue()); } return item; }