@Override public String getLabel() { String label = super.getLabel(); if (label == null) { javax.faces.context.FacesContext facesContext = javax.faces.context.FacesContext.getCurrentInstance(); if (facesContext.getCurrentPhaseId() == javax.faces.event.PhaseId.PROCESS_VALIDATIONS) { label = com.liferay.faces.util.component.ComponentUtil.getComponentLabel(this); } } return label; }
@Override public String getLabel() { String label = super.getLabel(); if (label == null) { javax.faces.context.FacesContext facesContext = javax.faces.context.FacesContext.getCurrentInstance(); if (facesContext.getCurrentPhaseId() == javax.faces.event.PhaseId.PROCESS_VALIDATIONS) { label = com.liferay.faces.util.component.ComponentUtil.getComponentLabel(this); } } return label; }
/** * <p><code>label</code> attribute description:</p> * * <div>A localized label for this component that is typically only rendered in a FacesMessage when validation fails.</div> */ @Override public String getLabel() { String label = super.getLabel(); if (label == null) { javax.faces.context.FacesContext facesContext = javax.faces.context.FacesContext.getCurrentInstance(); if (facesContext.getCurrentPhaseId() == javax.faces.event.PhaseId.PROCESS_VALIDATIONS) { label = com.liferay.faces.util.component.ComponentUtil.getComponentLabel(this); } } return label; }
context.addMessage(getClientId(context), FacesMessageUtil .getMessage(context, REQUIRED_MESSAGE_ID, new Object[] { getLabel() })); setValid(false); return;