Package com.volantis.mcs.protocols

Examples of com.volantis.mcs.protocols.XFTextInputAttributes


    public void testAddActionResetBasic() throws Exception {
        doTestAddActionReset("<refresh/>", null);
    }

    public void testAddActionResetFormAttributes() throws Exception {
        XFTextInputAttributes field = new XFTextInputAttributes();
        doTestAddActionReset("<refresh/>", field);
    }
View Full Code Here


        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

        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

            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

    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

        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

                        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

     * @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

     * @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

     * @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

TOP

Related Classes of com.volantis.mcs.protocols.XFTextInputAttributes

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.