protected int getMaxlength(UIInput input) { if (input instanceof HtmlInputText) { return ((HtmlInputText) input).getMaxlength(); } else if (input instanceof HtmlInputSecret) { return ((HtmlInputSecret) input).getMaxlength(); } return Integer.MIN_VALUE; }
protected void setMaxlength(UIInput input, int maxlength) { if (input instanceof HtmlInputText) { ((HtmlInputText) input).setMaxlength(maxlength); } else if (input instanceof HtmlInputSecret) { ((HtmlInputSecret) input).setMaxlength(maxlength); } else if (input instanceof InputTextarea) { ((InputTextarea) input).setMaxlength(maxlength); } }
Object value = link.getValue(); for (UIComponent child : link.getChildren()) { if (child instanceof ValueHolder) { return exportValue(context, child);
public HtmlForm() { super(); setRendererType("javax.faces.Form"); handleAttribute("enctype", "application/x-www-form-urlencoded"); }
public void setOnclick(String onclick) { getStateHelper().put(PropertyKeys.onclick, onclick ); _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONCLICK_PROP); } // Property: ondblclick
private HtmlPanelGrid gridComponent; public void someFunction(){ HtmlOutputText outPutText = new HtmlOutputText(); outPutText.setValue("Some Text"); gridComponent.getChildren().add(outPutText);
public HtmlPanelGroup getNavigationMenu() { HtmlPanelGroup menu = new HtmlPanelGroup(); menu.setId("menu"); HtmlOutputLink link = new HtmlOutputLink(); // ... other components etc. menu.getChildren().add(link); }
/** * Construct an instance of the HtmlInputHidden. */ public HtmlInputHidden() { setRendererType("javax.faces.Hidden"); }
@Override public Converter getConverter() { Converter converter = super.getConverter(); if (converter == null && PrimeApplicationContext.getCurrentInstance(getFacesContext()).getConfig().isClientSideValidationEnabled()) { DateTimeConverter con = new DateTimeConverter(); con.setPattern(calculatePattern()); con.setTimeZone(CalendarUtils.calculateTimeZone(this.getTimeZone())); con.setLocale(calculateLocale(getFacesContext())); return con; } return converter; } }
public void setStyleClass(String styleClass) { getStateHelper().put(PropertyKeys.styleClass, styleClass ); _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.STYLECLASS_PROP); }
HtmlOutcomeTargetLink link = new HtmlOutcomeTargetLink(); link.setValue("Edit"); link.setOutcome("edit"); UIParameter param = new UIParameter(); param.setName("id"); param.setValue("500"); link.getChildren().add(param);
public static Object newInstance(String type) throws FacesException { if (type == null) { return null; } return newInstance(simpleClassForName(type)); }
private static ResourceBundle getDefaultBundle(FacesContext facesContext, Locale locale) { return getBundle(facesContext, locale, FacesMessage.FACES_MESSAGES); }
@Override public int getCols() { int cols = super.getCols(); return cols > 0 ? cols : 20; }
@Override public int getRows() { int rows = super.getRows(); return rows > 0 ? rows : 3; }
public HtmlForm() { super(); setRendererType("javax.faces.Form"); handleAttribute("enctype", "application/x-www-form-urlencoded"); }
public void setOnmouseout(String onmouseout) { getStateHelper().put(PropertyKeys.onmouseout, onmouseout ); _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONMOUSEOUT_PROP); } // Property: onmouseover
protected int getMaxlength(UIInput input) { if (input instanceof HtmlInputText) { return ((HtmlInputText) input).getMaxlength(); } else if (input instanceof HtmlInputSecret) { return ((HtmlInputSecret) input).getMaxlength(); } return Integer.MIN_VALUE; }
public void setLabel(String label) { getStateHelper().put(PropertyKeys.label, label ); _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.LABEL_PROP); } // Property: alt
public void setOnchange(String onchange) { getStateHelper().put(PropertyKeys.onchange, onchange ); _CommonPropertyConstants.markProperty(this, _CommonPropertyConstants.ONCHANGE_PROP); }