Examples of TagAttributeException


Examples of javax.faces.view.facelets.TagAttributeException

        TagAttribute type = this.getAttribute("type");
        if (type != null)
        {
            if (!type.isLiteral())
            {
                throw new TagAttributeException(type, "Must be a literal class name of type ValueChangeListener");
            }
            else
            {
                // test it out
                try
                {
                    ReflectionUtil.forName(type.getValue());
                }
                catch (ClassNotFoundException e)
                {
                    throw new TagAttributeException(type, "Couldn't qualify ValueChangeListener", e);
                }
            }
            this.listenerType = type.getValue();
        }
        else
View Full Code Here

Examples of javax.faces.view.facelets.TagAttributeException

        TagAttribute type = this.getAttribute("type");
        if (type != null)
        {
            if (!type.isLiteral())
            {
                throw new TagAttributeException(type, "Must be a literal class name of type ActionListener");
            }
            else
            {
                // test it out
                try
                {
                    ReflectionUtil.forName(type.getValue());
                }
                catch (ClassNotFoundException e)
                {
                    throw new TagAttributeException(type, "Couldn't qualify ActionListener", e);
                }
            }
            this.listenerType = type.getValue();
        }
        else
View Full Code Here

Examples of javax.faces.view.facelets.TagAttributeException

                    // for this attached object.
                    return;
                }
                else
                {
                    throw new TagAttributeException(_event, "eventName could not be defined for f:ajax tag with no wrap mode.");
                }
            }
        }
        else if (!cvh.getEventNames().contains(eventName))
        {
            if (_wrapMode)
            {
                // The current component does not implement the event selected,
                // this ajax behavior cannot be applied, but we can't throw any exception
                // since we are in wrap mode and we have here the case that the
                // component could not be the target for this attached object.
                return;
            }
            else
            {
                throw new TagAttributeException(_event, "event it is not a valid eventName defined for this component");
            }
        }
       
        Map<String, List<ClientBehavior>> clientBehaviors = cvh.getClientBehaviors();
View Full Code Here

Examples of javax.faces.view.facelets.TagAttributeException

                    TimeZone tz = TimeZone.getTimeZone((String) t);
                    c.setTimeZone(tz);
                }
                else
                {
                    throw new TagAttributeException(this.tag, this.timeZone,
                                                    "Illegal TimeZone, must evaluate to either a java.util.TimeZone or String, is type: "
                                                            + t.getClass());
                }
            }
        }
View Full Code Here

Examples of javax.faces.view.facelets.TagAttributeException

            {
                eventClass = ReflectionUtil.forName (value);
            }
            catch (Throwable e)
            {
                throw new TagAttributeException (type, "Couldn't create event class", e);
            }
        }
        else if (events.size() > 1)
        {
            StringBuilder classNames = new StringBuilder ("[");
            Iterator<Class<? extends ComponentSystemEvent>> eventIterator = events.iterator();
           
            // TODO: The spec is somewhat vague, but I think we're supposed to throw an exception
            // here.  The @NamedEvent javadocs say that if a short name is registered to more than one
            // event class that we must throw an exception listing the short name and the classes in
            // the list _when the application makes reference to it_.  I believe processing this tag
            // qualifies as the application "making reference" to the short name.  Why the exception
            // isn't thrown when processing the @NamedEvent annotation, I don't know.  Perhaps follow
            // up with the EG to see if this is correct.
           
            while (eventIterator.hasNext())
            {
                classNames.append (eventIterator.next().getName());
               
                if (eventIterator.hasNext())
                {
                    classNames.append (", ");
                }
                else
                {
                    classNames.append ("]");
                }
            }
           
            throw new FacesException ("The event name '" + value + "' is mapped to more than one " +
                " event class: " + classNames.toString());
        }
        else
        {
            eventClass = events.iterator().next();
        }
       
        if (!ComponentSystemEvent.class.isAssignableFrom (eventClass))
        {
            throw new TagAttributeException (type, "Event class " + eventClass.getName() +
                " is not of type javax.faces.event.ComponentSystemEvent");
        }
       
        return (Class<? extends ComponentSystemEvent>) eventClass;
    }
View Full Code Here

Examples of javax.faces.view.facelets.TagAttributeException

        {
            this.literal = ELText.isLiteral(this.value);
        }
        catch (ELException e)
        {
            throw new TagAttributeException(this, e);
        }
    }
View Full Code Here

Examples of javax.faces.view.facelets.TagAttributeException

           
            return new TagMethodExpression(this, methodExpression);
        }
        catch (Exception e)
        {
            throw new TagAttributeException(this, e);
        }
    }
View Full Code Here

Examples of javax.faces.view.facelets.TagAttributeException

                {
                    return ctx.getExpressionFactory().coerceToType(this.value, type);
                }
                catch (Exception e)
                {
                    throw new TagAttributeException(this, e);
                }
            }
        }
        else
        {
            ValueExpression ve = this.getValueExpression(ctx, type);
            try
            {
                return ve.getValue(ctx);
            }
            catch (Exception e)
            {
                throw new TagAttributeException(this, e);
            }
        }
    }
View Full Code Here

Examples of javax.faces.view.facelets.TagAttributeException

                return new TagValueExpression(this, valueExpression);
            }
        }
        catch (Exception e)
        {
            throw new TagAttributeException(this, e);
        }
    }
View Full Code Here

Examples of javax.faces.view.facelets.TagAttributeException

        TagAttribute attr = this.getAttribute("name");
        if (attr != null)
        {
            if (!attr.isLiteral())
            {
                throw new TagAttributeException(this.tag, attr, "Must be Literal");
            }
            this.name = attr.getValue();
        }
        else
        {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.