Package org.apache.tapestry5.dom

Examples of org.apache.tapestry5.dom.Element.attribute()


        assertSame(w.end(), root);

        w.write("after child");

        root.attribute("gnip", "gnop");

        assertEquals(w.toString(),
                     "<root foo=\"bar\" gnip=\"gnop\">before child<nested>inner text</nested>after child</root>");
    }
View Full Code Here


        assertSame(w.end(), root);

        w.write("after child");

        root.attribute("gnip", "gnop");

        assertEquals(w.toString(),
                     "<root foo=\"bar\" gnip=\"gnop\">before child<nested>inner text</nested>after child</root>");
    }
View Full Code Here

            final Element checkbox = writer.element("input", "type", "checkbox", "id", clientId, "name", getControlName(), "value", clientValue);

            if (getSelected().contains(model.getValue()))
            {
                checkbox.attribute("checked", "checked");
            }
            writer.end();

            writer.element("label", "for", clientId);
            writer.write(model.getLabel());
View Full Code Here

        assertSame(w.end(), root);

        w.write("after child");

        root.attribute("gnip", "gnop");

        assertEquals(w.toString(),
                "<root gnip=\"gnop\" foo=\"bar\">before child<nested>inner text</nested>after child</root>");
    }
View Full Code Here

                String clientId = jss.allocateClientId(resources);

                JSONObject spec = new JSONObject("clientId", clientId);

                e.attribute("id", clientId);

                spec.put("leaf", node.isLeaf());

                if (hasChildren)
                {
View Full Code Here

        if (zone != null)
        {
            String id = jsSupport.allocateClientId(resources);

            element.attribute("id", id);

            clientBehaviorSupport.linkZone(id, zone, link);
        }
    }
View Full Code Here

                "id", clientId,
                "data-container-type", "zone");

        if (simpleIds)
        {
            e.attribute("data-simple-ids", "true");
        }

        resources.renderInformalParameters(writer);

        insideForm = formSupport != null;
View Full Code Here

        if (insideForm)
        {
            JSONObject parameters = new JSONObject(RequestConstants.FORM_CLIENTID_PARAMETER, formSupport.getClientId(),
                    RequestConstants.FORM_COMPONENTID_PARAMETER, formSupport.getFormComponentId());

            e.attribute("data-zone-parameters",
                    parameters.toString(compactJSON));

            hiddenFieldPositioner = new HiddenFieldPositioner(writer, rules);

            actionSink = new ComponentActionSink(logger, clientDataEncoder);
View Full Code Here

        // Write the data-page-initialized attribute in for all pages; it will be "true" when the page has no
        // initializations (which is somewhat rare in Tapestry). When the page has initializations, it will be set to
        // "true" once those initializations all run.
        if (body != null)
        {
            body.attribute("data-page-initialized", Boolean.toString(!hasScriptsOrInitializations));
        }

        if (!hasScriptsOrInitializations)
        {
            return;
View Full Code Here

        if (zone != null)
        {
            String id = renderSupport.allocateClientId(resources);

            element.attribute("id", id);

            clientBehaviorSupport.linkZone(id, zone);
        }
    }
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.