public static String invoke(MethodBinding methodBinding, FacesContext context) { try { return (String) methodBinding.invoke(context, null); } catch (EvaluationException e) { Throwable cause = e.getCause(); if (cause != null && cause instanceof AbortProcessingException) { throw (AbortProcessingException) cause; } throw e; } } }
public static void invokeMethodBinding(FacesContext facesContext, MethodBinding methodBinding, FacesEvent event) { if (methodBinding != null && event != null) { try { methodBinding.invoke(facesContext, new Object[]{event}); } catch (EvaluationException e) { Throwable cause = e.getCause(); if (cause instanceof AbortProcessingException) { throw (AbortProcessingException) cause; } else { throw e; } } } }
public static void invokeMethodBinding(FacesContext facesContext, MethodBinding methodBinding, FacesEvent event) { if (methodBinding != null && event != null) { try { methodBinding.invoke(facesContext, new Object[]{event}); } catch (EvaluationException e) { Throwable cause = e.getCause(); if (cause instanceof AbortProcessingException) { throw (AbortProcessingException) cause; } else { throw e; } } } }
protected void validateFromBinding(FacesContext context, Object value) { if (validatorBinding == null) { return; } try { validatorBinding.invoke(context, new Object[] { context, this, value }); } catch (EvaluationException e) { Throwable cause = e.getCause(); if (cause instanceof ValidatorException) { ValidatorException ve = (ValidatorException) e.getCause(); handleValidationException(context, ve); } else { throw e; } } }
/** * @deprecated since 2.0.0 */ @Deprecated public static void invokeMethodBinding( final FacesContext facesContext, final MethodBinding methodBinding, final FacesEvent event) { if (methodBinding != null && event != null) { try { methodBinding.invoke(facesContext, new Object[]{event}); } catch (final EvaluationException e) { final Throwable cause = e.getCause(); if (cause instanceof AbortProcessingException) { throw (AbortProcessingException) cause; } else { throw e; } } } }
protected void invokeMethodBinding(FacesEvent event) throws AbortProcessingException { try { methodBinding.invoke(getFacesContext(), new Object[] {event}); } catch (EvaluationException e) { Throwable cause = e.getCause(); if (cause != null && cause instanceof AbortProcessingException) { throw (AbortProcessingException)cause; } throw e; } }
protected void invokeMethodBinding(FacesEvent event) throws AbortProcessingException { try { methodBinding.invoke(getFacesContext(), new Object[]{event}); } catch (EvaluationException e) { Throwable cause = e.getCause(); if (cause != null && cause instanceof AbortProcessingException) { throw (AbortProcessingException) cause; } throw e; } }
protected void broadcastToActionListener(PaginatorActionEvent event) { FacesContext context = getFacesContext(); try { MethodBinding actionListenerBinding = getActionListener(); if (actionListenerBinding != null) { actionListenerBinding.invoke(context, new Object[]{event}); } // super.broadcast(event) does this itself //ActionListener[] actionListeners = getActionListeners(); //if(actionListeners != null) { // for(int i = 0; i < actionListeners.length; i++) { // actionListeners[i].processAction(event); // } //} } catch (EvaluationException e) { Throwable cause = e.getCause(); if (cause != null && cause instanceof AbortProcessingException) { throw(AbortProcessingException) cause; } throw e; } }
public Class getType(ELContext context, Object base, Object property) { if (property == null) { return null; } try { context.setPropertyResolved(true); if (base == null) { Object obj = this.getVariableResolver().resolveVariable( faces, property.toString()); return (obj != null) ? obj.getClass() : null; } else { if (base instanceof List || base.getClass().isArray()) { return this.getPropertyResolver().getType(base, Integer.parseInt(property.toString())); } else { return this.getPropertyResolver().getType(base, property); } } } catch (PropertyNotFoundException e) { throw new javax.el.PropertyNotFoundException(e.getMessage(), e .getCause()); } catch (EvaluationException e) { throw new ELException(e.getMessage(), e.getCause()); } }
public boolean isReadOnly(ELContext context, Object base, Object property) { if (property == null) { return true; } try { context.setPropertyResolved(true); if (base == null) { return false; // what can I do? } else { if (base instanceof List || base.getClass().isArray()) { return this.getPropertyResolver().isReadOnly(base, Integer.parseInt(property.toString())); } else { return this.getPropertyResolver().isReadOnly(base, property); } } } catch (PropertyNotFoundException e) { throw new javax.el.PropertyNotFoundException(e.getMessage(), e .getCause()); } catch (EvaluationException e) { throw new ELException(e.getMessage(), e.getCause()); } }
public Object getValue(ELContext context, Object base, Object property) { if (property == null) { return null; } try { context.setPropertyResolved(true); if (base == null) { return this.getVariableResolver().resolveVariable(faces, property.toString()); } else { if (base instanceof List || base.getClass().isArray()) { return this.getPropertyResolver().getValue(base, Integer.parseInt(property.toString())); } else { return this.getPropertyResolver().getValue(base, property); } } } catch (PropertyNotFoundException e) { throw new javax.el.PropertyNotFoundException(e.getMessage(), e .getCause()); } catch (EvaluationException e) { throw new ELException(e.getMessage(), e.getCause()); } }
public Class getType(ELContext context, Object base, Object property) { if (property == null) { return null; } try { context.setPropertyResolved(true); if (base == null) { Object obj = this.getVariableResolver().resolveVariable( faces, property.toString()); return (obj != null) ? obj.getClass() : null; } else { if (base instanceof List || base.getClass().isArray()) { return this.getPropertyResolver().getType(base, Integer.parseInt(property.toString())); } else { return this.getPropertyResolver().getType(base, property); } } } catch (PropertyNotFoundException e) { throw new javax.el.PropertyNotFoundException(e.getMessage(), e .getCause()); } catch (EvaluationException e) { throw new ELException(e.getMessage(), e.getCause()); } }
public boolean isReadOnly(ELContext context, Object base, Object property) { if (property == null) { return true; } try { context.setPropertyResolved(true); if (base == null) { return false; // what can I do? } else { if (base instanceof List || base.getClass().isArray()) { return this.getPropertyResolver().isReadOnly(base, Integer.parseInt(property.toString())); } else { return this.getPropertyResolver().isReadOnly(base, property); } } } catch (PropertyNotFoundException e) { throw new javax.el.PropertyNotFoundException(e.getMessage(), e .getCause()); } catch (EvaluationException e) { throw new ELException(e.getMessage(), e.getCause()); } }
@Override public Class getType(ELContext context, Object base, Object property) { if (property == null) { return null; } try { context.setPropertyResolved(true); if (base == null) { Object obj = this.getVariableResolver().resolveVariable( faces, property.toString()); return (obj != null) ? obj.getClass() : null; } else { if (base instanceof List || base.getClass().isArray()) { return this.getPropertyResolver().getType(base, Integer.parseInt(property.toString())); } else { return this.getPropertyResolver().getType(base, property); } } } catch (PropertyNotFoundException e) { throw new javax.el.PropertyNotFoundException(e.getMessage(), e .getCause()); } catch (EvaluationException e) { throw new ELException(e.getMessage(), e.getCause()); } }
@Override public boolean isReadOnly(ELContext context, Object base, Object property) { if (property == null) { return true; } try { context.setPropertyResolved(true); if (base == null) { return false; // what can I do? } else { if (base instanceof List || base.getClass().isArray()) { return this.getPropertyResolver().isReadOnly(base, Integer.parseInt(property.toString())); } else { return this.getPropertyResolver().isReadOnly(base, property); } } } catch (PropertyNotFoundException e) { throw new javax.el.PropertyNotFoundException(e.getMessage(), e .getCause()); } catch (EvaluationException e) { throw new ELException(e.getMessage(), e.getCause()); } }
@Override public boolean isReadOnly(ELContext context, Object base, Object property) { if (property == null) { return true; } try { context.setPropertyResolved(true); if (base == null) { return false; // what can I do? } else { if (base instanceof List || base.getClass().isArray()) { return this.getPropertyResolver().isReadOnly(base, Integer.parseInt(property.toString())); } else { return this.getPropertyResolver().isReadOnly(base, property); } } } catch (PropertyNotFoundException e) { throw new javax.el.PropertyNotFoundException(e.getMessage(), e .getCause()); } catch (EvaluationException e) { throw new ELException(e.getMessage(), e.getCause()); } }
public Object getValue(ELContext context, Object base, Object property) { if (property == null) { return null; } try { context.setPropertyResolved(true); if (base == null) { return this.getVariableResolver().resolveVariable(faces, property.toString()); } else { if (base instanceof List || base.getClass().isArray()) { return this.getPropertyResolver().getValue(base, Integer.parseInt(property.toString())); } else { return this.getPropertyResolver().getValue(base, property); } } } catch (PropertyNotFoundException e) { throw new javax.el.PropertyNotFoundException(e.getMessage(), e .getCause()); } catch (EvaluationException e) { throw new ELException(e.getMessage(), e.getCause()); } }
@Override public Object getValue(ELContext context, Object base, Object property) { if (property == null) { return null; } try { context.setPropertyResolved(true); if (base == null) { return this.getVariableResolver().resolveVariable(faces, property.toString()); } else { if (base instanceof List || base.getClass().isArray()) { return this.getPropertyResolver().getValue(base, Integer.parseInt(property.toString())); } else { return this.getPropertyResolver().getValue(base, property); } } } catch (PropertyNotFoundException e) { throw new javax.el.PropertyNotFoundException(e.getMessage(), e .getCause()); } catch (EvaluationException e) { throw new ELException(e.getMessage(), e.getCause()); } }
public void broadcast(FacesEvent event) throws AbortProcessingException { super.broadcast(event); if (event instanceof ValueChangeEvent) { MethodBinding valueChangeListenerBinding = getValueChangeListener(); if (valueChangeListenerBinding != null) { try { valueChangeListenerBinding.invoke(getFacesContext(), new Object[] { event }); } catch (EvaluationException e) { Throwable cause = e.getCause(); if (cause != null && cause instanceof AbortProcessingException) { throw (AbortProcessingException) cause; } else { throw e; } } } } }
public void broadcast(FacesEvent event) throws AbortProcessingException { super.broadcast(event); if (event instanceof TabChangeEvent) { TabChangeEvent tabChangeEvent = (TabChangeEvent) event; MethodBinding tabChangeListenerBinding = getTabChangeListener(); if (tabChangeListenerBinding != null) { try { tabChangeListenerBinding.invoke( getFacesContext(), new Object[]{tabChangeEvent}); } catch (EvaluationException e) { Throwable cause = e.getCause(); if (cause != null && cause instanceof AbortProcessingException) { throw(AbortProcessingException) cause; } else { throw e; } } } } }