Package com.sun.facelets.tag

Examples of com.sun.facelets.tag.TagException


        Iterator itr = this.findNextByType(ChooseWhenHandler.class);
        while (itr.hasNext()) {
            whenList.add(itr.next());
        }
        if (whenList.isEmpty()) {
            throw new TagException(this.tag, "Choose Tag must have one or more When Tags");
        }
        this.when = (ChooseWhenHandler[]) whenList.toArray(new ChooseWhenHandler[whenList.size()]);
       
        itr = this.findNextByType(ChooseOtherwiseHandler.class);
        if (itr.hasNext()) {
View Full Code Here


        ValueChangeListener listener = new LazyValueChangeListener(
            this.listenerType, b);
        evh.addValueChangeListener(listener);
      }
    } else {
      throw new TagException(this.tag,
          "Parent is not of type EditableValueHolder, type is: "
              + parent);
    }
  }
View Full Code Here

                }

                src.addActionListener(listener);
            }
        } else {
            throw new TagException(this.tag,
                    "Parent is not of type ActionSource, type is: " + parent);
        }
    }
View Full Code Here

     *      javax.faces.component.UIComponent)
     */
    public void apply(FaceletContext ctx, UIComponent parent)
            throws IOException, FacesException, FaceletException, ELException {
        if (parent == null) {
            throw new TagException(this.tag, "Parent UIComponent was null");
        }

        // only process if the parent is new to the tree
        if (parent.getParent() == null) {
            String n = this.name.getValue(ctx);
View Full Code Here

  public void apply(FaceletContext ctx, UIComponent parent)
      throws IOException, FacesException, FaceletException, ELException {
    if (ComponentSupport.isNew(parent)) {
      UIViewRoot root = ComponentSupport.getViewRoot(ctx, parent);
      if (root == null) {
        throw new TagException(this.tag, "UIViewRoot not available");
      }
      ValueExpression b = null;
      if (this.binding != null) {
        b = this.binding.getValueExpression(ctx, PhaseListener.class);
      }
View Full Code Here

   *      javax.faces.component.UIComponent)
   */
  public void apply(FaceletContext ctx, UIComponent parent)
      throws IOException, FacesException, FaceletException, ELException {
    if (parent == null) {
      throw new TagException(this.tag, "Parent UIComponent was null");
    }
    parent.getAttributes().put(KEY, this.name.getValue(ctx));
    try {
      this.nextHandler.apply(ctx, parent);
    } finally {
View Full Code Here

        }
        ActionListener listener = new LazyActionListener(this.listenerType, b);
        as.addActionListener(listener);
      }
        } else {
            throw new TagException(this.tag,
                    "Parent is not of type ActionSource, type is: " + parent);
        }
    }
View Full Code Here

     */
    public final void apply(FaceletContext ctx, UIComponent parent)
            throws IOException, FacesException, ELException {
        // make sure our parent is not null
        if (parent == null) {
            throw new TagException(this.tag, "Parent UIComponent was null");
        }
       
        // possible facet scoped
        String facetName = this.getFacetName(ctx, parent);

View Full Code Here

     *      javax.faces.component.UIComponent)
     */
    public final void apply(FaceletContext ctx, UIComponent parent)
            throws IOException, FacesException, FaceletException, ELException {
        if (parent == null || !(parent instanceof ValueHolder)) {
            throw new TagException(this.tag,
                    "Parent not an instance of ValueHolder: " + parent);
        }

        // only process if it's been created
        if (parent.getParent() == null) {
            // cast to a ValueHolder
            ValueHolder vh = (ValueHolder) parent;
            ValueExpression ve = null;
            Converter c = null;
            if (this.binding != null) {
                ve = this.binding.getValueExpression(ctx, Converter.class);
                c = (Converter) ve.getValue(ctx);
            }
            if (c == null) {
                c = this.createConverter(ctx);
                if (ve != null) {
                    ve.setValue(ctx, c);
                }
            }
            if (c == null) {
                throw new TagException(this.tag, "No Converter was created");
            }
            this.setAttributes(ctx, c);
            vh.setConverter(c);
            Object lv = vh.getLocalValue();
            FacesContext faces = ctx.getFacesContext();
View Full Code Here

     *            FaceletContext to use
     * @return Converter instance, cannot be null
     */
    protected Converter createConverter(FaceletContext ctx) {
        if (this.converterId == null) {
            throw new TagException(
                    this.tag,
                    "Default behavior invoked of requiring a converter-id passed in the constructor, must override ConvertHandler(ConverterConfig)");
        }
        return ctx.getFacesContext().getApplication().createConverter(this.converterId);
    }
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.