@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);
@SuppressWarnings({"UnusedDeclaration"}) protected UIComponent findChild(FaceletContext ctx, UIComponent parent, String tagId) { return ComponentSupport.findChildByTagId(ctx.getFacesContext(), parent, tagId); }
/** * Returns a new NumberConverter * * @see NumberConverter */ protected Converter createConverter(FaceletContext ctx) throws FacesException, ELException, FaceletException { return ctx.getFacesContext().getApplication().createConverter(NumberConverter.CONVERTER_ID); }
PropertyHandler getHandler(FaceletContext ctx, String name) { if (!ctx.getFacesContext().isProjectStage(ProjectStage.Development)) { if (Arrays.binarySearch(DEV_ONLY_ATTRIBUTES, name) >= 0) { return null; } } PropertyHandler h = managedHandlers.get(name); return ((h != null) ? h : genericHandler); }
private void privateOnComponentPopulated(FaceletContext ctx, UIComponent c) { if (c instanceof ClientBehaviorHolder) { FacesContext context = ctx.getFacesContext(); AjaxBehaviors ajaxBehaviors = AjaxBehaviors.getAjaxBehaviors(context, false); if (ajaxBehaviors != null) { ajaxBehaviors.addBehaviors(context, (ClientBehaviorHolder)c); } } if (c instanceof EditableValueHolder) { processValidators(ctx.getFacesContext(), (EditableValueHolder) c); } }
public void applyMetadata(FaceletContext ctx, Object instance) { ((EditableValueHolder) instance).addValidator(ctx.getFacesContext() .getApplication().createValidator(this.validatorId)); } }
public void applyMetadata(FaceletContext ctx, Object instance) { ((EditableValueHolder) instance).addValidator(ctx.getFacesContext().getApplication() .createValidator(this.validatorId)); } }
/** * Uses the specified "validatorId" to get a new Validator instance from the Application. * * See javax.faces.application.Application#createValidator(java.lang.String) * See javax.faces.view.facelets.ValidatorHandler#createValidator(javax.faces.view.facelets.FaceletContext) */ protected Validator createValidator(FaceletContext ctx) { return ctx.getFacesContext().getApplication().createValidator(this.getValidatorId(ctx)); }
/** * Uses the specified "converterId" to pull an instance from the Application * * @see javax.faces.application.Application#createComponent(java.lang.String) */ protected Converter createConverter(FaceletContext ctx) throws FacesException, ELException, FaceletException { return ctx.getFacesContext().getApplication().createConverter( this.converterId.getValue(ctx)); }
private void throwRequiredException(FaceletContext ctx, String facetName, UIComponent compositeParent) { throw new TagException(tag, "Unable to find facet named '" + facetName + "' in parent composite component with id '" + compositeParent .getClientId(ctx.getFacesContext()) + '\''); }
private void throwRequiredException(FaceletContext ctx, UIComponent compositeParent) { throw new TagException(tag, "Unable to find any children components " + "nested within parent composite component with id '" + compositeParent .getClientId(ctx.getFacesContext()) + '\''); }
private void throwRequiredException(FaceletContext ctx, String name, UIComponent compositeParent) { throw new TagException(this.tag, "Unable to find facet named '" + name + "' in parent composite component with id '" + compositeParent .getClientId(ctx.getFacesContext()) + '\''); }
public void apply(FaceletContext ctx, UIComponent parent) throws IOException { if (!FaceletViewHandlingStrategy.isBuildingMetadata(ctx.getFacesContext())) { this.nextHandler.apply(ctx, parent); } }
protected void popComponentFromEL(FaceletContext ctx, UIComponent c, CompositeComponentStackManager ccStackManager, boolean compCompPushed) { c.popComponentFromEL(ctx.getFacesContext()); if (compCompPushed) { ccStackManager.pop(TreeCreation); } }
private void throwRequiredException(FaceletContext ctx, String facetName, UIComponent compositeParent) { throw new TagException(tag, "Unable to find facet named '" + facetName + "' in parent composite component with id '" + compositeParent .getClientId(ctx.getFacesContext()) + '\''); }
protected boolean pushComponentToEL(FaceletContext ctx, UIComponent c, CompositeComponentStackManager ccStackManager) { c.pushComponentToEL(ctx.getFacesContext(), c); boolean compcompPushed = false; if (UIComponent.isCompositeComponent(c)) { compcompPushed = ccStackManager.push(c, TreeCreation); } return compcompPushed; }
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 void apply(FaceletContext ctx, UIComponent parent) throws IOException { UIComponent compositeParent = UIComponent.getCurrentCompositeComponent(ctx.getFacesContext()); if (compositeParent != null) { compositeParent.subscribeToEvent(PostAddToViewEvent.class, new RelocateFacetListener(ctx, parent, this.tag.getLocation())); } }
private void applyWrapping(FaceletContext ctx, UIComponent parent) throws IOException { ComponentValidators validators = ComponentValidators.getValidators(ctx.getFacesContext(), true); validators.pushValidatorInfo(createValidatorInfo(ctx)); owner.getValidatorConfig().getNextHandler().apply(ctx, parent); validators.popValidatorInfo(); }