Package com.sun.facelets.tag

Examples of com.sun.facelets.tag.TagException


     */
    public final void apply(FaceletContext ctx, UIComponent parent)
            throws IOException, FacesException, FaceletException, ELException {

        if (parent == null || !(parent instanceof EditableValueHolder)) {
            throw new TagException(this.tag,
                    "Parent not an instance of EditableValueHolder: " + parent);
        }

        // only process if it's been created
        if (parent.getParent() == null) {
            // cast to a ValueHolder
            EditableValueHolder evh = (EditableValueHolder) parent;
            ValueExpression ve = null;
            Validator v = null;
            if (this.binding != null) {
                ve = this.binding.getValueExpression(ctx, Validator.class);
                v = (Validator) ve.getValue(ctx);
            }
            if (v == null) {
                v = this.createValidator(ctx);
                if (ve != null) {
                    ve.setValue(ctx, v);
                }
            }
            if (v == null) {
                throw new TagException(this.tag, "No Validator was created");
            }
            this.setAttributes(ctx, v);
            evh.addValidator(v);
        }
    }
View Full Code Here


     *            FaceletContext to use
     * @return a new Validator instance
     */
    protected Validator createValidator(FaceletContext ctx) {
        if (this.validatorId == null) {
            throw new TagException(
                    this.tag,
                    "Default behavior invoked of requiring a validator-id passed in the constructor, must override ValidateHandler(ValidatorConfig)");
        }
        return ctx.getFacesContext().getApplication().createValidator(
                this.validatorId);
View Full Code Here

  }

  public void apply(FaceletContext faceletContext, UIComponent parent)
      throws FacesException, ELException {
    if (parent == null) {
      throw new TagException(tag, "Parent UIComponent was null");
    }

    if (ComponentSupport.isNew(parent)) {

      if (mode != null) {
View Full Code Here

              listener.getMethodExpression(faceletContext, null, TAB_CHANGE_LISTENER_ARGS)));
        }

      }
    } else {
      throw new TagException(tag, "Parent is not of type TabChangeSource, type is: " + parent);
    }
  }
View Full Code Here

      if (content.length() > 0) {
        page.getScriptBlocks().add(content);
      }
    } else {
      throw new TagException(tag, "Parent is not of type UIPage, type is: " + parent);
    }
  }
View Full Code Here

      if (ComponentSupport.isNew(parent)) {
        ActionSource actionSource = (ActionSource) parent;
        actionSource.addActionListener(new PopupActionListener(forComponent.getValue()));
      }
    } else {
      throw new TagException(tag, "Parent is not of type ActionSource, type is: " + parent);
    }
  }
View Full Code Here

      if (content.length() > 0) {
        page.getStyleBlocks().add(content);
      }
    } else {
      throw new TagException(tag, "Parent is not of type UIPage, type is: " + parent);
    }
  }
View Full Code Here

                new LegacyValueBinding(forValueExpression));
          }
        }
      }
    } else {
      throw new TagException(tag, "Parent is not of type ActionSource, type is: " + parent);
    }
  }
View Full Code Here

  }

  public void apply(FaceletContext faceletContext, UIComponent parent)
      throws FacesException, ELException {
    if (parent == null) {
      throw new TagException(tag, "Parent UIComponent was null");
    }

    if (ComponentSupport.isNew(parent)) {

      if (mode != null) {
View Full Code Here

        } else {
          changeSource.addTabChangeListener(listener);
        }
      }
    } else {
      throw new TagException(tag, "Parent is not of type TabChangeSource, type is: " + parent);
    }
  }
View Full Code Here

TOP

Related Classes of com.sun.facelets.tag.TagException

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.