Package org.apache.shale.clay.config.beans

Examples of org.apache.shale.clay.config.beans.ElementBean


        ComponentBean bean = xmlTemplateConfigBean.getElement("/org/apache/shale/clay/config/address.xml");
        assertNotNull(bean);
       
        Iterator ci = bean.getChildrenIterator();
        while (ci.hasNext()) {
            ElementBean child = (ElementBean) ci.next();
           
            AttributeBean attr = null;
            if (child.getId().equals("htmlBegin")) {
                attr = child.getAttribute("value");
                assertEquals("<html>", attr.getValue());
            } else if (child.getId().equals("htmlEnd")) {
                attr = child.getAttribute("value");
                assertEquals("</html>", attr.getValue());
            } else if (child.getId().equals("header")) {
                attr = child.getAttribute("value");
                assertEquals("<head><title>Testing</title></head>", attr.getValue());
            } else if (child.getId().equals("bodyBegin")) {
                attr = child.getAttribute("value");
                assertEquals("<body>", attr.getValue());
            } else if (child.getId().equals("bodyEnd")) {
                attr = child.getAttribute("value");
                assertEquals("</body>", attr.getValue());
            } else if (child.getId().equals("content")) {
                //look for a component that we have setup to test
                checkComponent(child, CUSTOM_HTML_COMPONENTS, true);
            }
        }
    }
View Full Code Here


     *
     * @param node markup
     * @return new config bean from the node
     */
    public ElementBean createElement(Node node) {
        ElementBean target = new ElementBean();
        target.setJsfid(getJsfid(node));
        target.setRenderId(getRenderId());

        return target;
    }
View Full Code Here

    protected void addConverter(Node node, ElementBean target) {
        ConverterBean targetConverter = new ConverterBean();

        //make sure we have the correct jsfid based on the namespace prefix
        Builder tmpBuilder = getBuilder(node);
        ElementBean tmp = tmpBuilder.createElement(node);

        String jsfid = tmp.getJsfid();
        targetConverter.setJsfid(jsfid);

        String converterId = (String) node.getAttributes().get("converterId");
        if (converterId != null) {
            targetConverter.setComponentType(tagsUtil.evalString(converterId));
View Full Code Here

    protected void addValidator(Node node, ElementBean target) {
        ValidatorBean targetValidator = new ValidatorBean();

        //make sure we have the correct jsfid based on the namespace prefix
        Builder tmpBuilder = getBuilder(node);
        ElementBean tmp = tmpBuilder.createElement(node);

        String jsfid = tmp.getJsfid();
        targetValidator.setJsfid(jsfid);

        String validatorId = (String) node.getAttributes().get("validatorId");
        if (validatorId != null) {
            targetValidator.setComponentType(tagsUtil.evalString(validatorId));
View Full Code Here

    protected void addActionListener(Node node, ElementBean target) {
        ActionListenerBean targetActionListener = new ActionListenerBean();

        //make sure we have the correct jsfid based on the namespace prefix
        Builder tmpBuilder = getBuilder(node);
        ElementBean tmp = tmpBuilder.createElement(node);

        String jsfid = tmp.getJsfid();
        targetActionListener.setJsfid(jsfid);

        String type = (String) node.getAttributes().get("type");
        if (type != null) {
            targetActionListener.setComponentType(tagsUtil.evalString(type));
View Full Code Here

    protected void addValueChangeListener(Node node, ElementBean target) {
        ValueChangeListenerBean targetValueChangeListener = new ValueChangeListenerBean();

        //make sure we have the correct jsfid based on the namespace prefix
        Builder tmpBuilder = getBuilder(node);
        ElementBean tmp = tmpBuilder.createElement(node);

        String jsfid = tmp.getJsfid();
        targetValueChangeListener.setJsfid(jsfid);

        String type = (String) node.getAttributes().get("type");
        if (type != null) {
            targetValueChangeListener.setComponentType(tagsUtil.evalString(type));
View Full Code Here

        // a facet.  Call back on the current builder
        while (ci.hasNext()) {
            Node child = (Node) ci.next();
            if (child.isWellFormed()) {
                Builder childBuilder = getBuilder(child);
                ElementBean nextTarget = childBuilder.createElement(child);
                nextTarget.setFacetName(facetName);
                target.addChild(nextTarget);
                childBuilder.encode(child, nextTarget, nextTarget);
                break;
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.shale.clay.config.beans.ElementBean

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.