@Override public Behavior createBehavior(String behaviorId) throws FacesException { return delegate().createBehavior(behaviorId); }
@Override protected ConfirmBehavior createBehavior(FaceletContext ctx, String eventName, UIComponent parent) { Application application = ctx.getFacesContext().getApplication(); ConfirmBehavior behavior = (ConfirmBehavior) application.createBehavior(ConfirmBehavior.BEHAVIOR_ID); setBehaviorAttribute(ctx, behavior, this.header, ConfirmBehavior.PropertyKeys.header.getExpectedType()); setBehaviorAttribute(ctx, behavior, this.message, ConfirmBehavior.PropertyKeys.message.getExpectedType()); setBehaviorAttribute(ctx, behavior, this.icon, ConfirmBehavior.PropertyKeys.icon.getExpectedType()); setBehaviorAttribute(ctx, behavior, this.disabled, ConfirmBehavior.PropertyKeys.disabled.getExpectedType()); setBehaviorAttribute(ctx, behavior, this.beforeShow, ConfirmBehavior.PropertyKeys.beforeShow.getExpectedType()); setBehaviorAttribute(ctx, behavior, this.escape, ConfirmBehavior.PropertyKeys.escape.getExpectedType()); return behavior; }
@Override protected AjaxBehavior createBehavior(FaceletContext ctx, String eventName, UIComponent parent) { Application application = ctx.getFacesContext().getApplication(); AjaxBehavior behavior = (AjaxBehavior) application.createBehavior(AjaxBehavior.BEHAVIOR_ID);
@Override public Behavior createBehavior(String behaviorId) throws FacesException { return application.createBehavior(behaviorId); }
/** * Get the delegate. * * @param facesContext the Faces context. * @return the delegate. */ private Behavior getDelegate(FacesContext facesContext) { if (delegate == null) { delegate = facesContext.getApplication().createBehavior(behaviorId); } return delegate; }
/** * <p class="changed_added_2_0">The default behavior of this method * is to call {@link Application#createBehavior(String)} on the * wrapped {@link Application} object.</p> */ @Override public Behavior createBehavior(String behaviorId) throws FacesException { return getWrapped().createBehavior(behaviorId); }
private ClientBehavior createBehavior(FacesContext context) { Application application = context.getApplication(); // Re-create the instance via the Application AjaxBehavior behavior = (AjaxBehavior)application.createBehavior( AjaxBehavior.BEHAVIOR_ID); // And re-initialize its state behavior.restoreState(context, behaviorState); return behavior; }
/** * <p class="changed_added_2_0">The default behavior of this method * is to call {@link Application#createBehavior(String)} on the * wrapped {@link Application} object.</p> */ @Override public Behavior createBehavior(String behaviorId) throws FacesException { return getWrapped().createBehavior(behaviorId); }
private ClientBehavior createBehavior(FacesContext context) { Application application = context.getApplication(); // Re-create the instance via the Application AjaxBehavior behavior = (AjaxBehavior)application.createBehavior( AjaxBehavior.BEHAVIOR_ID); // And re-initialize its state behavior.restoreState(context, behaviorState); return behavior; }
private ClientBehavior createBehavior(FacesContext context) { Application application = context.getApplication(); // Re-create the instance via the Application AjaxBehavior behavior = (AjaxBehavior)application.createBehavior( AjaxBehavior.BEHAVIOR_ID); // And re-initialize its state behavior.restoreState(context, behaviorState); return behavior; }
@Override public Behavior createBehavior(String behaviorId) throws FacesException { return getWrapped().createBehavior(behaviorId); }
@Override public Behavior createBehavior(String behaviorId) throws FacesException { return delegate().createBehavior(behaviorId); }
private ClientBehavior createBehavior(FacesContext context) { Application application = context.getApplication(); ClientBehavior behavior = (ClientBehavior) application.createBehavior(this.behaviorId); ((StateHolder) behavior).restoreState(context, behaviorState); if (behaviors == null) { behaviors = new ArrayList<ClientBehavior>(); } behaviors.add(behavior); return behavior; } }
/** * <p class="changed_added_2_0">The default behavior of this method * is to call {@link Application#createBehavior(String)} on the * wrapped {@link Application} object.</p> */ @Override public Behavior createBehavior(String behaviorId) throws FacesException { return getWrapped().createBehavior(behaviorId); }
@Override protected JavascriptBehavior createBehavior(final FaceletContext faceletContext, final String eventName, UIComponent component) { final Application application = faceletContext.getFacesContext().getApplication(); final JavascriptBehavior behavior = (JavascriptBehavior) application.createBehavior(JavascriptBehavior.BEHAVIOR_ID); setBehaviorAttribute(faceletContext, behavior, this.disabled, Boolean.class); setBehaviorAttribute(faceletContext, behavior, this.execute, String.class); return behavior; } }
protected Behavior createBehavior(FaceletContext ctx) { if (_delegate.getBehaviorId() == null) { throw new TagException( _delegate.getTag(), "No behavior id defined"); } return ctx.getFacesContext().getApplication().createBehavior(_delegate.getBehaviorId()); }
protected Behavior createBehavior(FaceletContext ctx) { if (_delegate.getBehaviorId() == null) { throw new TagException( _delegate.getTag(), "No behavior id defined"); } return ctx.getFacesContext().getApplication().createBehavior(_delegate.getBehaviorId()); }
protected Behavior createBehavior(FaceletContext ctx) { if (_delegate.getBehaviorId() == null) { throw new TagException( _delegate.getTag(), "No behavior id defined"); } return ctx.getFacesContext().getApplication().createBehavior(_delegate.getBehaviorId()); }
public static void renderFunction(FacesContext context, UIComponent component, Collection<ClientBehaviorContext.Parameter> params, String submitTarget) throws IOException { ClientBehaviorContext behaviorContext = ClientBehaviorContext.createClientBehaviorContext(context, component, "action", submitTarget, params); AjaxBehavior behavior = (AjaxBehavior) context.getApplication().createBehavior(AjaxBehavior.BEHAVIOR_ID); mapAttributes(component, behavior, "execute", "render", "onerror", "onevent", "resetValues"); context.getResponseWriter().append(behavior.getScript(behaviorContext)); }
@Override protected ConfirmBehavior createBehavior(FaceletContext ctx, String eventName, UIComponent parent) { Application application = ctx.getFacesContext().getApplication(); ConfirmBehavior behavior = (ConfirmBehavior) application.createBehavior(ConfirmBehavior.BEHAVIOR_ID); setBehaviorAttribute(ctx, behavior, this.header, ConfirmBehavior.PropertyKeys.header.expectedType); setBehaviorAttribute(ctx, behavior, this.message, ConfirmBehavior.PropertyKeys.message.expectedType); setBehaviorAttribute(ctx, behavior, this.icon, ConfirmBehavior.PropertyKeys.icon.expectedType); setBehaviorAttribute(ctx, behavior, this.disabled, ConfirmBehavior.PropertyKeys.disabled.expectedType); setBehaviorAttribute(ctx, behavior, this.beforeShow, ConfirmBehavior.PropertyKeys.beforeShow.expectedType); setBehaviorAttribute(ctx, behavior, this.escape, ConfirmBehavior.PropertyKeys.escape.expectedType); return behavior; }