Package org.apache.commons.jelly

Examples of org.apache.commons.jelly.JellyTagException


    }

    public void doTag(XMLOutput output) throws JellyTagException {
        SwitchTag tag = (SwitchTag)findAncestorWithClass(SwitchTag.class);
        if(null == tag) {
            throw new JellyTagException("This tag must be enclosed inside a <switch> tag" );
        }
        if(tag.hasDefaultBeenEncountered()) {
            throw new JellyTagException("Only one <default> tag is allowed per <switch>.");
        }
        tag.defaultEncountered();
        if(tag.isFallingThru() || (!tag.hasSomeCaseMatched())) {
            tag.caseMatched();
            tag.setFallingThru(fallThru);
View Full Code Here


            } else {
                parentArg.setValue(object);
            }
        }
        catch (ClassNotFoundException e) {
            throw new JellyTagException(e);
        }
        catch (InstantiationException e) {
            throw new JellyTagException(e);
        }
        catch (NoSuchMethodException e) {
            throw new JellyTagException(e);
        }
        catch (IllegalAccessException e) {
            throw new JellyTagException(e);
        }
        catch (InvocationTargetException e) {
            throw new JellyTagException(e);
        }
    }
View Full Code Here

        try {
            output.startElement(uri, localName, qname, attributes);
            invokeBody(output);
            output.endElement(uri, localName, qname);
        } catch (SAXException e) {
            throw new JellyTagException(e);
        }
    }
View Full Code Here

                StringWriter writer = new StringWriter();
                writeBody(writer);
                context.setVariable(var, writer.toString());
            }
            else {
                throw new JellyTagException( "This tag must have either the 'name' or the 'var' variables defined" );
            }
        } catch (FileNotFoundException e) {
            throw new JellyTagException(e);
        } catch (UnsupportedEncodingException e) {
            throw new JellyTagException(e);
        } catch (SAXException e) {
            throw new JellyTagException("could not write file",e);
        }
    }
View Full Code Here

    public void run(JellyContext context, XMLOutput output) throws JellyTagException {
        if ( text != null ) {
            try {
              output.write(text);
            } catch (SAXException e) {
                throw new JellyTagException("could not write to XMLOutput",e);
            }
        }
    }
View Full Code Here

        // create a new dynabean before the attributes are set
        try {
            bean = beanClass.newInstance();
            setDynaBean( new ConvertingWrapDynaBean( bean ) );
        } catch (InstantiationException e) {
            throw new JellyTagException("Could not instantiate dynabean",e);
        } catch (IllegalAccessException e) {
            throw new JellyTagException("Could not instantiate dynabean",e);
        }

        setAttributesSet.clear();
    }
View Full Code Here

            catch (InvocationTargetException e) {
                // methodInvocationError(bean, method, e);

                Throwable inner = e.getTargetException();

                throw new JellyTagException(inner);

            }
        }
    }
View Full Code Here

            Object value = beanMap.get(property);
            log.error(property + " -> " + value);
        }

        log.error(beanMap);
        throw new JellyTagException(e);
    }
View Full Code Here

        if ( result != null ) {

            try {
              output.objectData(result);
            } catch (SAXException e) {
                throw new JellyTagException("Could not write to XMLOutput",e);
            }

        }
    }
View Full Code Here

            BeanSource tag = (BeanSource) findAncestorWithClass(BeanSource.class);
            if (tag != null) {
                try {
                    bean = tag.getBean();
                } catch (JellyException e) {
                    throw new JellyTagException(e);
                }
            }
            if (bean == null) {
                throw new MissingAttributeException("bean");
            }
View Full Code Here

TOP

Related Classes of org.apache.commons.jelly.JellyTagException

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.