@Test public void testHasErrorMessages() throws Exception { jsf = EasyMock.createMock(FacesContext.class); expect(jsf.getMaximumSeverity()).andAnswer(new IAnswer<Severity>() { @Override public Severity answer() throws Throwable { return maximumSeverity; } }).anyTimes(); replay(jsf); maximumSeverity = FacesMessage.SEVERITY_WARN; assertEquals(false, hasErrorMessages(jsf)); maximumSeverity = FacesMessage.SEVERITY_INFO; assertEquals(false, hasErrorMessages(jsf)); maximumSeverity = FacesMessage.SEVERITY_ERROR; assertEquals(true, hasErrorMessages(jsf)); maximumSeverity = FacesMessage.SEVERITY_FATAL; assertEquals(true, hasErrorMessages(jsf)); }
private boolean hasErrorMessages(FacesContext context) { FacesMessage.Severity sev = context.getMaximumSeverity(); return (sev != null && (FacesMessage.SEVERITY_ERROR.compareTo(sev) <= 0)); }
UIRepeat extends UINamingContainer { private boolean hasErrorMessages(FacesContext context) { FacesMessage.Severity sev = context.getMaximumSeverity(); return (sev != null && (FacesMessage.SEVERITY_ERROR.compareTo(sev) <= 0)); } }
UIRepeat extends UINamingContainer { private boolean hasErrorMessages(FacesContext context) { FacesMessage.Severity sev = context.getMaximumSeverity(); return (sev != null && (FacesMessage.SEVERITY_ERROR.compareTo(sev) <= 0)); } UIRepeat(); }
UIRepeat extends UINamingContainer { private boolean hasErrorMessages(FacesContext context) { FacesMessage.Severity sev = context.getMaximumSeverity(); return (sev != null && (FacesMessage.SEVERITY_ERROR.compareTo(sev) <= 0)); } UIRepeat(); @Override String getFamily(); void setEnd(Integer end); Integer getEnd(); void setSize(Integer size); Integer getSize(); void setOffset(Integer offset); Integer getOffset(); void setBegin(Integer begin); Integer getBegin(); void setStep(Integer step); Integer getStep(); String getVar(); void setVar(String var); String getVarStatus(); void setVarStatus(String varStatus); Object getValue(); void setValue(Object value); @Override String getClientId(FacesContext faces); void process(FacesContext faces, PhaseId phase); @Override boolean invokeOnComponent(FacesContext faces, String clientId,
            ContextCallback callback); @Override boolean visitTree(VisitContext context, VisitCallback callback); @Override void processDecodes(FacesContext faces); @Override void processUpdates(FacesContext faces); @Override void processValidators(FacesContext faces); @Override void broadcast(FacesEvent event); @Override void queueEvent(FacesEvent event); @Override void restoreState(FacesContext faces, Object object); @Override Object saveState(FacesContext faces); @Override void encodeChildren(FacesContext faces); @Override boolean getRendersChildren(); }
UIRepeat extends UINamingContainer { private boolean hasErrorMessages(FacesContext context) { FacesMessage.Severity sev = context.getMaximumSeverity(); return (sev != null && (FacesMessage.SEVERITY_ERROR.compareTo(sev) <= 0)); } UIRepeat(); @Override String getFamily(); void setEnd(Integer end); Integer getEnd(); void setSize(Integer size); Integer getSize(); void setOffset(Integer offset); Integer getOffset(); void setBegin(Integer begin); Integer getBegin(); void setStep(Integer step); Integer getStep(); String getVar(); void setVar(String var); String getVarStatus(); void setVarStatus(String varStatus); Object getValue(); void setValue(Object value); @Override String getClientId(FacesContext faces); void process(FacesContext faces, PhaseId phase); @Override boolean invokeOnComponent(FacesContext faces, String clientId,
            ContextCallback callback); @Override boolean visitTree(VisitContext context, VisitCallback callback); @Override void processDecodes(FacesContext faces); @Override void processUpdates(FacesContext faces); @Override void processValidators(FacesContext faces); @Override void broadcast(FacesEvent event); @Override void queueEvent(FacesEvent event); @Override void restoreState(FacesContext faces, Object object); @Override Object saveState(FacesContext faces); @Override void encodeChildren(FacesContext faces); @Override boolean getRendersChildren(); static final String COMPONENT_TYPE; static final String COMPONENT_FAMILY; }