Package org.apache.isis.viewer.xhtml.viewer.tree

Examples of org.apache.isis.viewer.xhtml.viewer.tree.Attribute


    private Element form(final T association) {
        final String associationId = association.getId();
        final String formName = getFormNamePrefix() + associationId;
        final Element form = xhtmlRenderer.form(formName, getHtmlClassAttribute());
        form.addAttribute(new Attribute("class", associationId));

        final String inputFieldName = "proposedValue";
        if (inputField) {
            final Element inputValue = new Element("input");
            inputValue.addAttribute(new Attribute("type", "value"));
            inputValue.addAttribute(new Attribute("name", inputFieldName));
            form.appendChild(inputValue);
        }

        final Element inputButton = new Element("input");
        inputButton.addAttribute(new Attribute("type", "button"));
        inputButton.addAttribute(new Attribute("value", getFormButtonLabel()));
        final String servletContextName = getContextPath();
        final String url = MessageFormat.format("{0}/object/{1}", servletContextName, getOidStr());
        inputButton.addAttribute(new Attribute("onclick", invokeJavascript(url, associationId, inputFieldName)));

        form.appendChild(inputButton);
        form.addAttribute(new Attribute("action", url));

        return form;
    }
View Full Code Here


    }

    private Element renderForm(final String formName, final String uri, final List<ObjectActionParameter> parameters) {

        final Element form = xhtmlRenderer.form(formName, HtmlClass.ACTION);
        form.addAttribute(new Attribute("method", "POST"));
        form.addAttribute(new Attribute("action", uri));

        renderInputFieldsForParameters(parameters, form);

        renderInputButton(form);
View Full Code Here

            final Element inputLabel = new Element("p");
            inputLabel.appendChild(parameter.getName());
            form.appendChild(inputLabel);

            final Element inputValue = new Element("input");
            inputValue.addAttribute(new Attribute("type", "value"));
            inputValue.addAttribute(new Attribute("name", inputFieldName));
            inputValue.addAttribute(new Attribute("class", parameter.getName()));
            form.appendChild(inputValue);
        }
    }
View Full Code Here

        }
    }

    private void renderInputButton(final Element form) {
        final Element inputButton = new Element("input");
        inputButton.addAttribute(new Attribute("type", "submit"));
        inputButton.addAttribute(new Attribute("value", "Invoke"));
        form.appendChild(inputButton);
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.xhtml.viewer.tree.Attribute

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.