Examples of TapestryException


Examples of org.apache.tapestry5.ioc.internal.util.TapestryException

                if (callback.isEventAborted()) return;
            }
        }
        catch (RuntimeException ex)
        {
            throw new TapestryException(ex.getMessage(), getLocation(), ex);
        }
    }
View Full Code Here

Examples of org.apache.tapestry5.ioc.internal.util.TapestryException

        for (String name : InternalUtils.sortedKeys(mixinIdToComponentResources))
            addUnboundParameterNames(name, unbound, mixinIdToComponentResources.get(name));

        if (unbound.isEmpty()) return;

        throw new TapestryException(StructureMessages.missingParameters(unbound, this), this, null);
    }
View Full Code Here

Examples of org.apache.tapestry5.ioc.internal.util.TapestryException

    public void addBlock(String blockId, Block block)
    {
        if (blocks == null) blocks = CollectionFactory.newCaseInsensitiveMap();

        if (blocks.containsKey(blockId))
            throw new TapestryException(StructureMessages.duplicateBlock(this, blockId), block, null);

        blocks.put(blockId, block);
    }
View Full Code Here

Examples of org.apache.tapestry5.ioc.internal.util.TapestryException

            rendering = false;

            Element current = writer.getElement();

            if (current != expectedElementAtCompletion)
                throw new TapestryException(StructureMessages.unbalancedElements(completeId), getLocation(), null);

            invoke(false, POST_RENDER_CLEANUP);

            queue.endComponent();
View Full Code Here

Examples of org.apache.tapestry5.ioc.internal.util.TapestryException

            catch (XMLStreamException e)
            {
                // Ignore it.
            }

            throw new TapestryException(ServicesMessages.templateParseError(resource, ex), getLocation(),
                                        ex);
        }

        return new ComponentTemplateImpl(resource, tokens, componentIds);
    }
View Full Code Here

Examples of org.apache.tapestry5.ioc.internal.util.TapestryException

        boolean isComponent = (id != null || type != null);

        // If provided t:mixins but not t:id or t:type, then its not quite a component

        if (mixins != null && !isComponent)
            throw new TapestryException(ServicesMessages.mixinsInvalidWithoutIdOrType(elementName), location, null);

        if (isComponent)
        {
            tokens.add(new StartComponentToken(elementName, id, type, mixins, location));
        }
View Full Code Here

Examples of org.apache.tapestry5.ioc.internal.util.TapestryException

    private void classicParameter()
    {
        String parameterName = getSingleParameter("name");

        if (InternalUtils.isBlank(parameterName))
            throw new TapestryException(ServicesMessages.parameterElementNameRequired(), getLocation(), null);

        tokens.add(new ParameterToken(parameterName, getLocation()));
    }
View Full Code Here

Examples of org.apache.tapestry5.ioc.internal.util.TapestryException

     * Tapestry 5.1 uses a special namespace (usually mapped to "p:") and the name becomes the parameter element.
     */
    private void parameterElement()
    {
        if (reader.getAttributeCount() > 0)
            throw new TapestryException(ServicesMessages.parameterElementDoesNotAllowAttributes(), getLocation(),
                                        null);

        tokens.add(new ParameterToken(reader.getLocalName(), getLocation()));
    }
View Full Code Here

Examples of org.apache.tapestry5.ioc.internal.util.TapestryException

                continue;
            }

            // Only the named attribute is allowed.

            throw new TapestryException(ServicesMessages.undefinedTapestryAttribute(reader.getLocalName(),
                                                                                    qName.toString(), attributeName),
                                        getLocation(), null);
        }

        return result;
View Full Code Here

Examples of org.apache.tapestry5.ioc.internal.util.TapestryException

        if (ID_PATTERN.matcher(id).matches()) return;

        // Not a match.

        throw new TapestryException(ServicesMessages.invalidId(messageKey, id), getLocation(), null);
    }
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.