Package javax.faces.component.behavior

Examples of javax.faces.component.behavior.Behavior


     * @see javax.faces.application.Application#createBehavior(String)
     */
    public Behavior createBehavior(String behaviorId) throws FacesException {

        Util.notNull("behaviorId", behaviorId);
        Behavior returnVal = (Behavior) newThing(behaviorId, behaviorMap);
        if (returnVal == null) {
            Object[] params = {behaviorId};
            if (LOGGER.isLoggable(Level.SEVERE)) {
                LOGGER.log(Level.SEVERE,
                        "jsf.cannot_instantiate_behavior_error", params);
View Full Code Here


    public void applyAttachedObject(FacesContext context, UIComponent parent) {
        FaceletContext ctx = (FaceletContext) context.getAttributes().get(FaceletContext.FACELET_CONTEXT_KEY);
        // cast to the ClientBehaviorHolder.
        ClientBehaviorHolder behaviorHolder = (ClientBehaviorHolder) parent;
        ValueExpression bindingExpr=null;
        Behavior behavior=null;
        if (null != owner.getBinding()){
            bindingExpr = owner.getBinding().getValueExpression(ctx, Behavior.class);
            behavior = (Behavior) bindingExpr.getValue(ctx);
        }
        if (null == behavior){
View Full Code Here

    }

    public void apply(FaceletContext ctx, UIComponent parent) throws IOException {

        Application application = ctx.getFacesContext().getApplication();
        Behavior behavior = application.createBehavior(getBehaviorId());
        if (behavior instanceof AjaxBehavior) {
            setAttributes(ctx, behavior);
            AjaxBehavior ajaxBehavior = (AjaxBehavior) behavior;

            FacesContext context = ctx.getFacesContext();
View Full Code Here

    public void apply(FaceletContext ctx, UIComponent parent) throws IOException {

        if (owner.isWrapping()) {

            Application application = ctx.getFacesContext().getApplication();
            Behavior behavior = application.createBehavior(this.behaviorId);

            if (behavior instanceof ClientBehavior) {
                ClientBehavior clientBehavior = (ClientBehavior) behavior;
                owner.setAttributes(ctx, clientBehavior);
View Full Code Here

     * @see javax.faces.application.Application#createBehavior(String)
     */
    public Behavior createBehavior(String behaviorId) throws FacesException {

        Util.notNull("behaviorId", behaviorId);
        Behavior returnVal = (Behavior) newThing(behaviorId, behaviorMap);
        if (returnVal == null) {
            Object[] params = {behaviorId};
            if (LOGGER.isLoggable(Level.SEVERE)) {
                LOGGER.log(Level.SEVERE,
                        "jsf.cannot_instantiate_behavior_error", params);
View Full Code Here

     * @see javax.faces.application.Application#createBehavior(String)
     */
    public Behavior createBehavior(String behaviorId) throws FacesException {

        Util.notNull("behaviorId", behaviorId);
        Behavior returnVal = (Behavior) newThing(behaviorId, behaviorMap);
        if (returnVal == null) {
            Object[] params = {behaviorId};
            if (LOGGER.isLoggable(Level.SEVERE)) {
                LOGGER.log(Level.SEVERE,
                        "jsf.cannot_instantiate_behavior_error", params);
View Full Code Here

    public void applyAttachedObject(FacesContext context, UIComponent parent) {
        FaceletContext ctx = (FaceletContext) context.getAttributes().get(FaceletContext.FACELET_CONTEXT_KEY);
        // cast to the ClientBehaviorHolder.
        ClientBehaviorHolder behaviorHolder = (ClientBehaviorHolder) parent;
        ValueExpression bindingExpr=null;
        Behavior behavior=null;
        if (null != owner.getBinding()){
            bindingExpr = owner.getBinding().getValueExpression(ctx, Behavior.class);
            behavior = (Behavior) bindingExpr.getValue(ctx);
        }
        if (null == behavior){
View Full Code Here

    if (facesEvent instanceof AjaxBehaviorEvent) {

      AjaxBehaviorEvent ajaxBehaviorEvent = (AjaxBehaviorEvent) facesEvent;

      UIComponent uiComponent = ajaxBehaviorEvent.getComponent();
      Behavior behavior = ajaxBehaviorEvent.getBehavior();

      FacesContext facesContext = FacesContext.getCurrentInstance();
      Map<String, String> requestParameterMap = facesContext.getExternalContext().getRequestParameterMap();

      String clientId = getClientId(facesContext);
View Full Code Here

        }
      }

      // Queue an tabView tab event rather than the specified faces event.
      AjaxBehaviorEvent behaviorEvent = (AjaxBehaviorEvent) facesEvent;
      Behavior behavior = behaviorEvent.getBehavior();
      TabSelectEvent tabEvent = new TabSelectEvent(this, behavior, tab, rowData);
      super.queueEvent(tabEvent);
    }

    // Otherwise, queue the specified faces event.
View Full Code Here

        }
      }

      // Queue an accordion tab event rather than the specified faces event.
      AjaxBehaviorEvent behaviorEvent = (AjaxBehaviorEvent) facesEvent;
      Behavior behavior = behaviorEvent.getBehavior();
      String eventName = requestParameterMap.get(FacesConstants.JAVAX_FACES_BEHAVIOR_EVENT);

      if (TabCollapseEvent.TAB_COLLAPSE.equals(eventName)) {
        TabCollapseEvent tabCollapseEvent = new TabCollapseEvent(this, behavior, tab, rowData);
        super.queueEvent(tabCollapseEvent);
View Full Code Here

TOP

Related Classes of javax.faces.component.behavior.Behavior

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.