Package javax.faces.view.facelets

Examples of javax.faces.view.facelets.TagException


        }

        this.listenerMethod = this.getAttribute("listener");

        if (this.listenerMethod != null && this.binding != null) {
            throw new TagException(this.tag, "Attributes 'listener' and 'binding' cannot be used simultaneously");
        }

        if (this.listenerMethod != null && this.listenerType != null) {
            throw new TagException(this.tag, "Attributes 'listener' and 'type' cannot be used simultaneously");
        }
    }
View Full Code Here


        }
    }

    public void applyAttachedObject(FacesContext context, UIComponent parent) {
        if (!(parent instanceof ActionSource)) {
            throw new TagException(this.tag, "Parent is not of type ActionSource, type is: " + parent);
        }

        ActionSource as = (ActionSource) parent;

        FaceletContext ctx = (FaceletContext) context.getAttributes().get(TagHandlerUtils.FACELET_CONTEXT_KEY);
View Full Code Here

            return;
        }

        if (UIComponent.isCompositeComponent(parent)) {
            if (null == getFor()) {
                throw new TagException(this.tag,
                    "actionListener tags nested within composite components must have a non-null 'for' attribute");
            }

            TagHandlerUtils.getOrCreateRetargetableHandlersList(parent).add(this);
        } else {
View Full Code Here

                }
                catch (ELException e)
                {
                    if (this.tags.size() > 0)
                    {
                        throw new TagException((Tag) this.tags.peek(), e.getMessage());
                    }
                    else
                    {
                        throw new ELException(this.alias + ": " + e.getMessage(), e.getCause());
                    }
                }
            }

            // KEEP THESE SEPARATE SO LOGIC DOESN'T GET FUBARED
        }
        else if (this.buffer.length() > 0)
        {
            String s = this.buffer.toString();
            if (s.trim().length() > 0)
            {
                if (child)
                {
                    s = trimRight(s);
                }
                if (s.length() > 0)
                {
                    try
                    {
                        ELText txt = ELText.parse(s);
                        if (txt != null)
                        {
                            if (txt.isLiteral())
                            {
                                this.children.add(new UILiteralTextHandler(txt.toString()));
                            }
                            else
                            {
                                this.children.add(new UITextHandler(this.alias, txt));
                            }
                        }
                    }
                    catch (ELException e)
                    {
                        if (this.tags.size() > 0)
                        {
                            throw new TagException((Tag) this.tags.peek(), e.getMessage());
                        }
                        else
                        {
                            throw new ELException(this.alias + ": " + e.getMessage(), e.getCause());
                        }
View Full Code Here

        {
            CompositeComponentResourceTagHandler.addAttachedObjectHandler(parent, this);
        }
        else
        {
            throw new TagException(this.tag, "Parent not composite component or an instance of EditableValueHolder: " + parent);
        }
    }
View Full Code Here

        }
        else if (UIComponent.isCompositeComponent(parent))
        {
            if (getAttribute(JSFAttr.FOR_ATTR) == null)
            {
                throw new TagException(tag, "is nested inside a composite component"
                        + " but does not have a for attribute.");
            }
            CompositeComponentResourceTagHandler.addAttachedObjectHandler(parent, this);
        }
        else
        {
            throw new TagException(this.tag, "Parent is not composite component or of type ActionSource, type is: " + parent);
        }
    }
View Full Code Here

                CompositeComponentResourceTagHandler.addAttachedObjectHandler(
                        parent, this);
            }
            else
            {
                throw new TagException(this.tag,
                        "Parent is not composite component or of type ClientBehaviorHolder, type is: "
                                + parent);
            }
        }
       
View Full Code Here

        {
            CompositeComponentResourceTagHandler.addAttachedObjectHandler(parent, this);
        }
        else
        {
            throw new TagException(this.tag, "Parent is not composite component or of type ActionSource, type is: " + parent);
        }
    }
View Full Code Here

            {
                meta = new MetadataTargetImpl(_type);
            }
            catch (IntrospectionException e)
            {
                throw new TagException(_tag, "Error Creating TargetMetadata", e);
            }

            _metadata.put(key, meta);
        }
View Full Code Here

       
        String facetName = _name.getValue(ctx);

        if (_required != null && _required.getBoolean(ctx) && parentCompositeComponent.getFacet(facetName) == null)
        {
            throw new TagException(this.tag, "Cannot found facet with name "+facetName+" in composite component "
                    +parentCompositeComponent.getClientId(ctx.getFacesContext()));
        }
       
        c.getAttributes().put(UIComponent.FACETS_KEY, facetName);
    }
View Full Code Here

TOP

Related Classes of javax.faces.view.facelets.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.