protected void encodeOptionLabel(FacesContext context, SelectOneRadio radio, String containerClientId, SelectItem option, boolean disabled) throws IOException { ResponseWriter writer = context.getResponseWriter(); String label = option.getLabel(); writer.startElement("label", null); writer.writeAttribute("for", containerClientId, null); if (disabled) { writer.writeAttribute("class", "ui-state-disabled", null); } if (option.getDescription() != null) { writer.writeAttribute("title", option.getDescription(), null); } if (label != null) { if (option.isEscape()) { writer.writeText(label, null); } else { writer.write(label); } } writer.endElement("label"); }
protected void encodeOptionLabel(FacesContext context, SelectManyCheckbox checkbox, String containerClientId, SelectItem option, boolean disabled) throws IOException { ResponseWriter writer = context.getResponseWriter(); writer.startElement("label", null); if (disabled) { writer.writeAttribute("class", "ui-state-disabled", null); } writer.writeAttribute("for", containerClientId, null); if (option.getDescription() != null) { writer.writeAttribute("title", option.getDescription(), null); } if (option.isEscape()) { writer.writeText(option.getLabel(), null); } else { writer.write(option.getLabel()); } writer.endElement("label"); }
writer.writeAttribute("class", itemStyleClass, null); writer.writeAttribute("data-label", itemLabel, null); if (selectItem.getDescription() != null) { writer.writeAttribute("title", selectItem.getDescription(), null);
protected void encodeItem(FacesContext context, SelectOneMenu menu, SelectItem selectItem, String styleClass) throws IOException { ResponseWriter writer = context.getResponseWriter(); String itemLabel = selectItem.getLabel(); itemLabel = isValueBlank(itemLabel) ? " " : itemLabel; String itemStyleClass = styleClass; if (selectItem.isNoSelectionOption()) { itemStyleClass = itemStyleClass + " ui-noselection-option"; } writer.startElement("li", null); writer.writeAttribute("class", itemStyleClass, null); writer.writeAttribute("data-label", itemLabel, null); writer.writeAttribute("tabindex", "-1", null); writer.writeAttribute("role", "option", null); if (selectItem.getDescription() != null) { writer.writeAttribute("title", selectItem.getDescription(), null); } if (itemLabel.equals(" ")) { writer.write(itemLabel); } else { if (selectItem.isEscape()) { writer.writeText(itemLabel, "value"); } else { writer.write(itemLabel); } } writer.endElement("li"); }
if (option.getDescription() != null) { writer.writeAttribute("title", option.getDescription(), null);
writer.writeAttribute("checked", "checked", null); if (option.getDescription() != null) { writer.writeAttribute("title", option.getDescription(), null);
if (option.getDescription() != null) { writer.writeAttribute("title", option.getDescription(), null);
writer.writeAttribute("class", buttonStyle, null); writer.writeAttribute("tabindex", button.getTabindex(), null); if (option.getDescription() != null) { writer.writeAttribute("title", option.getDescription(), null);
if (option.getDescription() != null) { writer.writeAttribute("title", option.getDescription(), null);
//String selectedvalue SelectItem selectedValue;//create getters setter public void changeDD(ValueChangeEvent vce) throws IOException{ System.out.println("in value change"); System.out.println("New value-->"+vce.getNewValue().toString()); String description = selectedValue.getDescription(); } }
@Override public String getItemDescription() { return getSelectItem().getDescription(); }
@Override public String getItemDescription() { return getSelectItem().getDescription(); }
@Override public String getItemDescription() { return getSelectItem().getDescription(); }
/** * Renders a single <option> tag. For some reason, * <code>SelectItem</code> and <code>UISelectItem</code> don't share a * common interface, so this method is repeated twice. * * @param rw * The response writer * @param selectItem * The current SelectItem * @param selectedOption * the currently selected option * @throws IOException * thrown if something's wrong with the response writer */ protected void renderOption(ResponseWriter rw, SelectItem selectItem, String[] selectedOption, int index) throws IOException { String itemLabel = selectItem.getLabel(); final String description = selectItem.getDescription(); final Object itemValue = selectItem.getValue(); renderOption(rw, selectedOption, index, itemLabel, description, itemValue); }
/** * Renders a single <option> tag. For some reason, * <code>SelectItem</code> and <code>UISelectItem</code> don't share a * common interface, so this method is repeated twice. * * @param rw * The response writer * @param selectItem * The current SelectItem * @param selectedOption * the currently selected option * @throws IOException * thrown if something's wrong with the response writer */ protected void renderOption(ResponseWriter rw, SelectItem selectItem, String[] selectedOption, int index) throws IOException { String itemLabel = selectItem.getLabel(); final String description = selectItem.getDescription(); final Object itemValue = selectItem.getValue(); renderOption(rw, selectedOption, index, itemLabel, description, itemValue); }
/** * Renders a single <option> tag. For some reason, <code>SelectItem</code> * and <code>UISelectItem</code> don't share a common interface, so this method * is repeated twice. * * @param rw * The response writer * @param selectItem * The current SelectItem * @throws IOException * thrown if something's wrong with the response writer */ protected void renderOption(FacesContext context, SelectOneMenu menu, ResponseWriter rw, SelectItem selectItem, int index, UIComponent itemComponent, boolean isSelected) throws IOException { String itemLabel = selectItem.getLabel(); final String description = selectItem.getDescription(); final Object itemValue = selectItem.getValue(); renderOption(context, menu, rw, index, itemLabel, description, itemValue, selectItem.isDisabled(), selectItem.isEscape(), itemComponent, isSelected); }
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; } }
/** * Renders a single <option> tag. For some reason, <code>SelectItem</code> * and <code>UISelectItem</code> don't share a common interface, so this method * is repeated twice. * * @param rw * The response writer * @param selectItem * The current SelectItem * @throws IOException * thrown if something's wrong with the response writer */ protected void renderOption(FacesContext context, SelectOneMenu menu, ResponseWriter rw, SelectItem selectItem, int index, UIComponent itemComponent, boolean isSelected) throws IOException { String itemLabel = selectItem.getLabel(); final String description = selectItem.getDescription(); final Object itemValue = selectItem.getValue(); renderOption(context, menu, rw, index, itemLabel, description, itemValue, selectItem.isDisabled(), selectItem.isEscape(), itemComponent, isSelected); }
protected void encodeOptionLabel(FacesContext context, SelectManyCheckbox checkbox, String containerClientId, SelectItem option, boolean disabled) throws IOException { ResponseWriter writer = context.getResponseWriter(); writer.startElement("label", null); if (disabled) { writer.writeAttribute("class", "ui-state-disabled", null); } writer.writeAttribute("for", containerClientId, null); if (option.getDescription() != null) { writer.writeAttribute("title", option.getDescription(), null); } if (option.isEscape()) { writer.writeText(option.getLabel(), null); } else { writer.write(option.getLabel()); } writer.endElement("label"); }
protected void encodeOptionLabel(FacesContext context, SelectOneRadio radio, String containerClientId, SelectItem option, boolean disabled) throws IOException { ResponseWriter writer = context.getResponseWriter(); String label = option.getLabel(); writer.startElement("label", null); writer.writeAttribute("for", containerClientId, null); if (disabled) { writer.writeAttribute("class", "ui-state-disabled", null); } if (option.getDescription() != null) { writer.writeAttribute("title", option.getDescription(), null); } if (label != null) { if (option.isEscape()) { writer.writeText(label, null); } else { writer.write(label); } } writer.endElement("label"); }