@Override protected Object getValue(UIComponent component) { if (Util.componentIsDisabled(component)) { return null; } else { return ((UIOutput) component).getValue(); } }
@Override protected Object getValue(UIComponent component) { if (Util.componentIsDisabled(component)) { return null; } else { return ((UIOutput) component).getValue(); } }
@Override protected Object getValue(UIComponent component) { if (Util.componentIsDisabled(component)) { return null; } else { return ((UIOutput) component).getValue(); } }
@Override protected Object getValue(UIComponent component) { if (Util.componentIsDisabled(component)) { return null; } else { return ((UIOutput) component).getValue(); } }
@Override protected Object getValue(UIComponent component) { if (Util.componentIsDisabled(component)) { return null; } else { return ((UIOutput) component).getValue(); } }
public OptionComponentInfo(UIComponent component) { Map<String, Object> attributes = component.getAttributes(); this.disabledClass = (String) attributes.get("disabledClass"); this.enabledClass = (String) attributes.get("enabledClass"); this.selectedClass = (String) attributes.get("selectedClass"); this.unselectedClass = (String) attributes.get("unselectedClass"); this.disabled = Util.componentIsDisabled(component); this.hideNoSelection = MenuRenderer.isHideNoSelection(component); }
public OptionComponentInfo(UIComponent component) { Map<String, Object> attributes = component.getAttributes(); this.disabledClass = (String) attributes.get("disabledClass"); this.enabledClass = (String) attributes.get("enabledClass"); this.selectedClass = (String) attributes.get("selectedClass"); this.unselectedClass = (String) attributes.get("unselectedClass"); this.disabled = Util.componentIsDisabled(component); this.hideNoSelection = MenuRenderer.isHideNoSelection(component); }
public OptionComponentInfo(UIComponent component) { Map<String, Object> attributes = component.getAttributes(); this.disabledClass = (String) attributes.get("disabledClass"); this.enabledClass = (String) attributes.get("enabledClass"); this.selectedClass = (String) attributes.get("selectedClass"); this.unselectedClass = (String) attributes.get("unselectedClass"); this.disabled = Util.componentIsDisabled(component); this.hideNoSelection = MenuRenderer.isHideNoSelection(component); }
Util.componentIsDisabled(component)) { behaviors = null;
@Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } ResponseWriter writer = context.getResponseWriter(); assert(writer != null); String endElement = ((Util.componentIsDisabled(component) || context.getAttributes().remove(NO_NAV_CASE) != null) ? "span" : "a"); writer.endElement(endElement); }
@Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } ResponseWriter writer = context.getResponseWriter(); assert(writer != null); String endElement = ((Util.componentIsDisabled(component) || context.getAttributes().remove(NO_NAV_CASE) != null) ? "span" : "a"); writer.endElement(endElement); }
@Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } ResponseWriter writer = context.getResponseWriter(); assert(writer != null); String endElement = ((Util.componentIsDisabled(component) || context.getAttributes().remove(NO_NAV_CASE) != null) ? "span" : "a"); writer.endElement(endElement); }
@Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } ResponseWriter writer = context.getResponseWriter(); assert(writer != null); String endElement = ((Util.componentIsDisabled(component) || context.getAttributes().remove(NO_NAV_CASE) != null) ? "span" : "a"); writer.endElement(endElement); }
@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } NavigationCase navCase = null; boolean failedToResolveNavigationCase = false; boolean disabled = Util.componentIsDisabled(component); if (!disabled) { navCase = getNavigationCase(context, component); if (navCase == null) { failedToResolveNavigationCase = true; context.getAttributes().put(NO_NAV_CASE, true); } } if (disabled || navCase == null) { renderAsDisabled(context, component, failedToResolveNavigationCase); } else { renderAsActive(context, navCase, component); } }
@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } NavigationCase navCase = null; boolean failedToResolveNavigationCase = false; boolean disabled = Util.componentIsDisabled(component); if (!disabled) { navCase = getNavigationCase(context, component); if (navCase == null) { failedToResolveNavigationCase = true; context.getAttributes().put(NO_NAV_CASE, true); } } if (disabled || navCase == null) { renderAsDisabled(context, component, failedToResolveNavigationCase); } else { renderAsActive(context, navCase, component); } }
@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } NavigationCase navCase = null; boolean failedToResolveNavigationCase = false; boolean disabled = Util.componentIsDisabled(component); if (!disabled) { navCase = getNavigationCase(context, component); if (navCase == null) { failedToResolveNavigationCase = true; context.getAttributes().put(NO_NAV_CASE, true); } } if (disabled || navCase == null) { renderAsDisabled(context, component, failedToResolveNavigationCase); } else { renderAsActive(context, navCase, component); } }
@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { rendererParamsNotNull(context, component); if (!shouldEncode(component)) { return; } NavigationCase navCase = null; boolean failedToResolveNavigationCase = false; boolean disabled = Util.componentIsDisabled(component); if (!disabled) { navCase = getNavigationCase(context, component); if (navCase == null) { failedToResolveNavigationCase = true; context.getAttributes().put(NO_NAV_CASE, true); } } if (disabled || navCase == null) { renderAsDisabled(context, component, failedToResolveNavigationCase); } else { renderAsActive(context, navCase, component); } }
/** * The difference with default encoding is: * <li>Every radio button of same 'group' will have same 'name' attribute rendered, relative to UIForm parent. * <li>The 'value' attribute of every radio button is prefixed with client ID of radio button component itself. * <li>No additional (table) markup is being rendered. * <li>Label, if any, is rendered directly after radio button element, without additional markup. */ protected void encodeEndGroup(FacesContext context, UISelectOne radio, Group group) throws IOException { rendererParamsNotNull(context, radio); if (!shouldEncode(radio)) { return; } SelectItem currentItem = RenderKitUtils.getSelectItems(context, radio).next(); String clientId = radio.getClientId(context); Object itemValue = currentItem.getValue(); Converter<?> converter = radio.getConverter(); boolean checked = isChecked(context, radio, itemValue); boolean disabled = Util.componentIsDisabled(radio); ResponseWriter writer = context.getResponseWriter(); assert (writer != null); renderInput(context, writer, radio, clientId, itemValue, converter, checked, disabled, group); if (currentItem.getLabel() != null) { renderLabel(writer, radio, clientId, currentItem, new OptionComponentInfo(radio)); } }
/** * The difference with default encoding is: * <li>Every radio button of same 'group' will have same 'name' attribute rendered, relative to UIForm parent. * <li>The 'value' attribute of every radio button is prefixed with client ID of radio button component itself. * <li>No additional (table) markup is being rendered. * <li>Label, if any, is rendered directly after radio button element, without additional markup. */ protected void encodeEndGroup(FacesContext context, UISelectOne radio, Group group) throws IOException { rendererParamsNotNull(context, radio); if (!shouldEncode(radio)) { return; } SelectItem currentItem = RenderKitUtils.getSelectItems(context, radio).next(); String clientId = radio.getClientId(context); Object itemValue = currentItem.getValue(); Converter<?> converter = radio.getConverter(); boolean checked = isChecked(context, radio, itemValue); boolean disabled = Util.componentIsDisabled(radio); ResponseWriter writer = context.getResponseWriter(); assert (writer != null); renderInput(context, writer, radio, clientId, itemValue, converter, checked, disabled, group); if (currentItem.getLabel() != null) { renderLabel(writer, radio, clientId, currentItem, new OptionComponentInfo(radio)); } }
/** * The difference with default encoding is: * <li>Every radio button of same 'group' will have same 'name' attribute rendered, relative to UIForm parent. * <li>The 'value' attribute of every radio button is prefixed with client ID of radio button component itself. * <li>No additional (table) markup is being rendered. * <li>Label, if any, is rendered directly after radio button element, without additional markup. */ protected void encodeEndGroup(FacesContext context, UISelectOne radio, Group group) throws IOException { rendererParamsNotNull(context, radio); if (!shouldEncode(radio)) { return; } SelectItem currentItem = RenderKitUtils.getSelectItems(context, radio).next(); String clientId = radio.getClientId(context); Object itemValue = currentItem.getValue(); Converter<?> converter = radio.getConverter(); boolean checked = isChecked(context, radio, itemValue); boolean disabled = Util.componentIsDisabled(radio); ResponseWriter writer = context.getResponseWriter(); assert (writer != null); renderInput(context, writer, radio, clientId, itemValue, converter, checked, disabled, group); if (currentItem.getLabel() != null) { renderLabel(writer, radio, clientId, currentItem, new OptionComponentInfo(radio)); } }