Examples of XFFormAttributes


Examples of com.volantis.mcs.protocols.XFFormAttributes

        // appears) varies depending on whether this is an emulated XForm or an
        // actual XFForm. If this is representing an emulated xfform, then the
        // XFFormAttributes will not be set, but the containingXFFormAttribute
        // will be and vice versa.
        String containingXFFormName;
        XFFormAttributes formAttributes = attributes.getFormAttributes();
        if (formAttributes != null) {
            containingXFFormName = formAttributes.getName();
        } else {
            containingXFFormName = attributes.getContainingXFFormName();
        }

        // Generate an id for the sub dialog, it consists of the form id
View Full Code Here

Examples of com.volantis.mcs.protocols.XFFormAttributes

     * @param attributes The attributes to use when generating the mark up.
     */
    public void doActionInput(DOMOutputBuffer dom,
                              XFActionAttributes attributes) {

       XFFormAttributes formAttributes = attributes.getFormAttributes();

        // if this action is being rendered in a form, then only the first
        // action should do anything in VoiceXML, the rest are ignored.
        if (formAttributes != null) {
            if (formAttributes.getActionCount() != 0) {
                if (logger.isDebugEnabled()) {
                    logger.debug("Ignoring action");
                }
                return;
            }

            formAttributes.setActionCount(1);
        }

        String value;
        Element element;

        // Generate the markup.
        // @todo 2005060816 annotate child with style information if it's not inherited from the parent
        element = dom.openStyledElement("filled", attributes);

        // set any attribute values that should be applied for all form fields.
        addFormFieldAttributes(element, attributes);

        // If the field name is set for this action then we need to initialise
        // a variable with the same name so the value will be submitted.
        String fieldName = attributes.getName();
        if (fieldName != null) {
            value = attributes.getValue();
            if (value == null) {
                value = " ";
            }
            element = dom.addElement("var");
            element.setAttribute("name", fieldName);
            element.setAttribute("expr", value);
        }

        element = dom.addElement("submit");

        // Check if processing an emulated XForm or real XFForm markup because
        // we cannot populate the submit element's next and method attributes
        // until later (after XFormEmulationTransformer) if it's emulated.
        if (formAttributes != null) {

            // Set the next and method attributes to those associated
            // with the form
            String resolvedHref = resolveFormAction(formAttributes);
            element.setAttribute("next", resolvedHref);
            element.setAttribute("method", formAttributes.getMethod());

            // Set the namelist attribute to the fields defined in the
            // form attributes.
            StringBuffer buffer = new StringBuffer(URLConstants.FORM_PARAMETER);
            for (Iterator i = formAttributes.getFields().iterator(); i.hasNext();) {

                XFFormFieldAttributes field = (XFFormFieldAttributes) i.next();

                // Ignore other action fields when generating the field names.
                if (field != attributes && field instanceof XFActionAttributes) {
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.