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 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; }
@Override public Integer getMaxLength() { Integer maxLength = super.getMaxLength(); // If the developer has not specified a maxLength on the outputRemainingChars, then // try to get the maxlength from the associated input component. if (maxLength == null) { String forComponent = getFor(); if (forComponent == null) { logger.error("getMaxLength: Please specify a 'for' attribute for the outputRemainingChars component."); } else { UIComponent inputComponent = findComponent(forComponent); if (inputComponent != null) { if (inputComponent instanceof HtmlInputText) { HtmlInputText htmlInputText = (HtmlInputText) inputComponent; maxLength = htmlInputText.getMaxlength(); } else if (inputComponent instanceof HtmlInputTextarea) { HtmlInputTextarea htmlInputTextarea = (HtmlInputTextarea) inputComponent; Object maxLengthObject = htmlInputTextarea.getAttributes().get("maxlength"); if (maxLengthObject != null) { maxLength = Integer.parseInt(maxLengthObject.toString()); } } } } } return maxLength; }
@Override public Integer getMaxLength() { Integer maxLength = super.getMaxLength(); // If the developer has not specified a maxLength on the outputRemainingChars, then // try to get the maxlength from the associated input component. if (maxLength == null) { String forComponent = getFor(); if (forComponent == null) { logger.error("getMaxLength: Please specify a 'for' attribute for the outputRemainingChars component."); } else { UIComponent inputComponent = findComponent(forComponent); if (inputComponent != null) { if (inputComponent instanceof HtmlInputText) { HtmlInputText htmlInputText = (HtmlInputText) inputComponent; maxLength = htmlInputText.getMaxlength(); } else if (inputComponent instanceof HtmlInputTextarea) { HtmlInputTextarea htmlInputTextarea = (HtmlInputTextarea) inputComponent; Object maxLengthObject = htmlInputTextarea.getAttributes().get("maxlength"); if (maxLengthObject != null) { maxLength = Integer.parseInt(maxLengthObject.toString()); } } } } } return maxLength; }
@Override public Integer getMaxLength() { Integer maxLength = super.getMaxLength(); // If the developer has not specified a maxLength on the outputRemainingChars, then // try to get the maxlength from the associated input component. if (maxLength == null) { String forComponent = getFor(); if (forComponent == null) { logger.error("getMaxLength: Please specify a 'for' attribute for the outputRemainingChars component."); } else { UIComponent inputComponent = findComponent(forComponent); if (inputComponent != null) { if (inputComponent instanceof HtmlInputText) { HtmlInputText htmlInputText = (HtmlInputText) inputComponent; maxLength = htmlInputText.getMaxlength(); } else if (inputComponent instanceof HtmlInputTextarea) { HtmlInputTextarea htmlInputTextarea = (HtmlInputTextarea) inputComponent; Object maxLengthObject = htmlInputTextarea.getAttributes().get("maxlength"); if (maxLengthObject != null) { maxLength = Integer.parseInt(maxLengthObject.toString()); } } } } } return maxLength; }
dest.setLang(src.getLang()); dest.setLocalValueSet(src.isLocalValueSet()); dest.setMaxlength(src.getMaxlength()); dest.setOnblur(src.getOnblur()); dest.setOnchange(src.getOnchange());
dest.setLang(src.getLang()); dest.setLocalValueSet(src.isLocalValueSet()); dest.setMaxlength(src.getMaxlength()); dest.setOnblur(src.getOnblur()); dest.setOnchange(src.getOnchange());
dest.setLang(src.getLang()); dest.setLocalValueSet(src.isLocalValueSet()); dest.setMaxlength(src.getMaxlength()); dest.setOnblur(src.getOnblur()); dest.setOnchange(src.getOnchange());
dest.setLang(src.getLang()); dest.setLocalValueSet(src.isLocalValueSet()); dest.setMaxlength(src.getMaxlength()); dest.setOnblur(src.getOnblur()); dest.setOnchange(src.getOnchange());
dest.setLang(src.getLang()); dest.setLocalValueSet(src.isLocalValueSet()); dest.setMaxlength(src.getMaxlength()); dest.setOnblur(src.getOnblur()); dest.setOnchange(src.getOnchange());
dest.setLang(src.getLang()); dest.setLocalValueSet(src.isLocalValueSet()); dest.setMaxlength(src.getMaxlength()); dest.setOnblur(src.getOnblur()); dest.setOnchange(src.getOnchange());
dest.setLang(src.getLang()); dest.setLocalValueSet(src.isLocalValueSet()); dest.setMaxlength(src.getMaxlength()); dest.setOnblur(src.getOnblur()); dest.setOnchange(src.getOnchange());
dest.setLang(src.getLang()); dest.setLocalValueSet(src.isLocalValueSet()); dest.setMaxlength(src.getMaxlength()); dest.setOnblur(src.getOnblur()); dest.setOnchange(src.getOnchange());