Package com.sun.facelets.tag

Examples of com.sun.facelets.tag.TagException


  }

  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)) {

      Object attributeName = name.isLiteral()
View Full Code Here


          valueHolder.setConverter(converter);
        }
        // TODO else LOG.warn?
      }
    } else {
      throw new TagException(tag, "Parent is not of type ValueHolder, 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

   * javax.faces.component.UIComponent)
   */
  public 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);
    }
    if (null == parent.getParent()) {
      // New created component, add validator.
      FacesContext facesContext = FacesContext.getCurrentInstance();
View Full Code Here

    public AjaxListenerHandler(TagConfig config) {
        super(config);
        this.binding = this.getAttribute("binding");
        this.type = this.getAttribute("type");
        if(binding == null && type == null){
            throw new TagException(this.tag, "One of the attribute 'binding' or type' is required");
        }
        if (binding == null && type != null) {
            if (!type.isLiteral()) {
                throw new TagAttributeException(this.tag, this.type, Messages.getMessage(Messages.MUST_BE_LITERAL_ERROR));
            }
View Full Code Here

                    }
                }
                src.addAjaxListener(listener);
            }
        } else {
            throw new TagException(this.tag, Messages.getMessage(Messages.NOT_PARENT_AJAX_COMPONENT_ERROR, parent));
        }
    }
View Full Code Here

        int childCount = facet.getChildCount();
        if (childCount == 1) {
            c = (UIComponent) facet.getChildren().get(0);
            parent.getFacets().put(facetName, c);
        } else {
            throw new TagException(this.tag, Messages.getMessage(Messages.FACET_TAG_MANY_CHILDREN_ERROR));
        }
    }
View Full Code Here

        } else if (isRemove(qname[0], qname[1])) {
            this.units.push(new RemoveUnit());
        } else if (this.tagLibrary.containsTagHandler(qname[0], qname[1])) {
            this.startUnit(new TagUnit(this.tagLibrary, qname[0], qname[1], t, this.nextTagId()));
        } else if (this.tagLibrary.containsNamespace(qname[0])) {
            throw new TagException(orig, "Tag Library supports namespace: "+qname[0]+", but no tag was defined for name: "+qname[1]);
        } else {
            TextUnit unit;
            if (this.currentUnit() instanceof TextUnit) {
                unit = (TextUnit) this.currentUnit();
            } else {
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.