Package org.apache.tapestry5.ioc.internal.util

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


    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

            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

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

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

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

        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

    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

     * 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

                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

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

        // Not a match.

        throw new TapestryException(ServicesMessages.invalidId(messageKey, id), getLocation(), null);
    }
View Full Code Here

            }
            catch (Exception ex)
            {
                String message = InternalMessages.failureInstantiatingObject(model.getBeanType(),
                        resources.getCompleteId(), ex);
                throw new TapestryException(message, resources.getLocation(), ex);
            }

            // If 'object' parameter is bound to a null-value BeanValidationContext is empty.
            // This prevents JSR-303 javascript validators to be rendered properly .
            refreshBeanValidationContext();
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.ioc.internal.util.TapestryException

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.