Examples of XFTextInputAttributes


Examples of com.volantis.mcs.protocols.XFTextInputAttributes

        XFTextInputAttributes field = new XFTextInputAttributes();
        doTestAddActionReset("<refresh/>", field);
    }

    public void testAddActionResetFormAttributesInitialValue() throws Exception {
        XFTextInputAttributes field = new XFTextInputAttributes();
        field.setName("Name");
        field.setEntryContainerInstance(new PaneInstance(null));

        String expected = "<refresh><setvar name=\"Name\" value=\"\"/></refresh>";
        doTestAddActionReset(expected, field);
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.XFTextInputAttributes

        attributes.setStyles(StylesBuilder.getInitialValueStyles());

        XFFormAttributes formAttributes = new XFFormAttributes();
        attributes.setFormAttributes(formAttributes);

        XFTextInputAttributes field = new XFTextInputAttributes();
        field.setInitial("InitialValue");
        field.setName("Name");
        field.setEntryContainerInstance(new PaneInstance(null));
        formAttributes.addField(field);
        protocol.addActionReset(buffer, attributes);
        String expected = transformMarkup(
                "<refresh><setvar name=\"Name\" value=\"InitialValue\"/>" +
                "</refresh>",
View Full Code Here

Examples of com.volantis.mcs.protocols.XFTextInputAttributes

            final String format, final String expectedEmptyOk,
            final String expectedFormat) {

        StrictStyledDOMHelper helper = new StrictStyledDOMHelper();

        XFTextInputAttributes attributes = new XFTextInputAttributes();
        String css;
        if (format == null) {
            css = "";
        } else {
            css = "mcs-input-format:\"" + format + "\"";
        }

        attributes.setStyles(StylesBuilder.getCompleteStyles(
                css));

        Element element = domFactory.createElement("input");
        protocol.addTextInputValidation(element, attributes);
View Full Code Here

Examples of com.volantis.mcs.protocols.XFTextInputAttributes

    public void testAddTextInputValidation() {
        privateSetUp();

        StrictStyledDOMHelper helper = new StrictStyledDOMHelper();

        XFTextInputAttributes attributes = new XFTextInputAttributes();
        attributes.setStyles(StylesBuilder.getCompleteStyles("mcs-rows: 3"));

        Element element = domFactory.createElement("input");
        protocol.addTextInputValidation(element, attributes);

        String output = helper.render(element);
View Full Code Here

Examples of com.volantis.mcs.protocols.XFTextInputAttributes

        if(!supportsJavaScript()) {
            return false;
        }
        StringBuffer sb = new StringBuffer();
        Object obj  = null;
        XFTextInputAttributes attribute = null;
        Iterator i = attributes.getFields().iterator();
        while(i.hasNext()) {
            obj = i.next();
            if(obj instanceof XFTextInputAttributes) {
                attribute = (XFTextInputAttributes)obj;
View Full Code Here

Examples of com.volantis.mcs.protocols.XFTextInputAttributes

                        getExtractorContext().getAssetResolver(),
                        getTextInputFormatParser());

        StringBuffer sb = new StringBuffer();
        Object obj  = null;
        XFTextInputAttributes attribute = null;
        Iterator i = attributes.getFields().iterator();
        while(i.hasNext()) {
            obj = i.next();
            if(obj instanceof XFTextInputAttributes) {
                attribute = (XFTextInputAttributes)obj;
View Full Code Here

Examples of com.volantis.mcs.protocols.XFTextInputAttributes

     * @param context
     */
    public XFSecretElementImpl(XDIMEContextInternal context) {
        super(XFormElements.SECRET, context);

        protocolAttributes = new XFTextInputAttributes();

        // Add xfsecret specific events.
        new XFormsValueChangedEvent().registerEvents(eventMapper);
        new XFormsFocusEvent().registerEvents(eventMapper);
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.XFTextInputAttributes

     * @param context
     */
    public XFTextAreaElementImpl(XDIMEContextInternal context) {
        super(XFormElements.TEXTAREA, context);

        protocolAttributes = new XFTextInputAttributes();

        // Add xftext specific events.
        new XFormsValueChangedEvent().registerEvents(eventMapper);
        new XFormsFocusEvent().registerEvents(eventMapper);
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.XFTextInputAttributes

     * @param context
     */
    public XFInputElementImpl(XDIMEContextInternal context) {
        super(XFormElements.INPUT, context);

        protocolAttributes = new XFTextInputAttributes();

        // Add xfinput specific events.
        new XFormsValueChangedEvent().registerEvents(eventMapper);
        new XFormsFocusEvent().registerEvents(eventMapper);
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.XFTextInputAttributes

        // =====================================================================
        TextInputFormatScriptGenerator generator =
                new TextInputFormatScriptGenerator(resolverMock,
                        new TextInputFormatParser(false));

        XFTextInputAttributes attributes = new XFTextInputAttributes();
        attributes.setName("abc");
        attributes.setErrmsg(new LiteralTextAssetReference("error message"));
        attributes.setCaption(new LiteralTextAssetReference("caption"));
        attributes.setStyles(StylesBuilder.getSparseStyles(
                "mcs-input-format: \"M:M\""));

        StringBuffer buffer = new StringBuffer();
        generator.writeJavaScriptValidation(attributes, buffer);
        assertEquals("if(!(new RegEx(\"Z\",form.abc.value).match())) {\n" +
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.