public void setVarNodeToggler(String varNodeToggler) { _varNodeToggler = varNodeToggler; // create a method binding for the expand control String bindingString = "#{" + varNodeToggler + ".toggleExpanded}"; MethodBinding actionBinding = FacesContext.getCurrentInstance().getApplication().createMethodBinding(bindingString, null); getExpandControl().setAction(actionBinding); }
public void setVarNodeToggler(String varNodeToggler) { this.varNodeToggler = varNodeToggler; String bindingString = BindingUtil.getExpression(varNodeToggler, "toggleExpanded"); MethodBinding actionBinding = FacesContext.getCurrentInstance() .getApplication().createMethodBinding(bindingString, null); expandControl.setAction(actionBinding); }
/** * Helper to set an action property into a command component * * @param command Command component * @param action The action method binding or outcome to set */ protected void setActionProperty(UICommand command, String action) { if (action != null) { if (isValueReference(action)) { MethodBinding vb = getFacesContext().getApplication().createMethodBinding(action, null); command.setAction(vb); } else { MethodBinding vb = new ConstantMethodBinding(action); command.setAction(vb); } } }
/** * Helper to set an action property into a command component * * @param command Command component * @param action The action method binding or outcome to set */ protected void setActionProperty(UICommand command, String action) { if (action != null) { if (isValueReference(action)) { MethodBinding vb = getFacesContext().getApplication().createMethodBinding(action, null); command.setAction(vb); } else { MethodBinding vb = new ConstantMethodBinding(action); command.setAction(vb); } } }
/** * Helper to set an action property into a command component * * @param command Command component * @param action The action method binding or outcome to set */ protected void setActionProperty(UICommand command, String action) { if (action != null) { if (isValueReference(action)) { MethodBinding vb = getFacesContext().getApplication().createMethodBinding(action, null); command.setAction(vb); } else { MethodBinding vb = new ConstantMethodBinding(action); command.setAction(vb); } } }
protected void setActionProperty(UIComponent component, String value) { if (value == null) { return; } if (!(component instanceof UICommand)) { throw new NoUICommandRuntimeException(component.getClass()); } MethodBinding mb = null; if (isValueReference(value)) { mb = createMethodBinding(value, null); } else { mb = new SimpleMethodBinding(value); } ((UICommand) component).setAction(mb); }
public void encodeBegin(FacesContext context) throws IOException { super.encodeBegin(context); UICommand command = _JsfConversationUtils.findParentCommand(this); if (command != null) { // This component has a UICommand ancestor. Replace its "action" MethodBinding // with a proxy. if (!inited) { MethodBinding original = command.getAction(); command.setAction(new _EndConversationMethodBindingFacade( getName(), getOnOutcomes(), original, getErrorOutcome())); inited = true; } } else { // This component has no UICommand ancestor. Always end the conversation. ConversationUtils.invalidateIfExists(getName()); } }
command.setAction(new EndConversationMethodBindingFacade( getName(), getOnOutcomes(),