Package org.apache.cocoon.forms.formmodel

Examples of org.apache.cocoon.forms.formmodel.DataWidget


                field.setValues(newValues);
            } else
                throw new SAXException("Could not convert: " + input +
                                       " to " + type.getTypeClass());
        } else if (this.currentWidget instanceof DataWidget) {
            DataWidget data = (DataWidget)this.currentWidget;
            Datatype type = data.getDatatype();
            ConversionResult conv =
                type.convertFromString(input, this.locale);
            if (conv.isSuccessful()) {
                data.setValue(conv.getResult());
            } else
                throw new SAXException("Could not convert: " + input +
                                       " to " + type.getTypeClass());
        } else if (this.currentWidget instanceof BooleanField) {
            // FIXME: BooleanField should implement DataWidget, which
View Full Code Here


                newValues[i] = values[i];
            }
            newValues[valLen] = conv.getResult();
            field.setValues(newValues);
        } else if (this.currentWidget instanceof DataWidget) {
            DataWidget data = (DataWidget) this.currentWidget;
            Datatype type = data.getDatatype();
            ConversionResult conv = type.convertFromString(input, this.locale);
            if (!conv.isSuccessful()) {
                throw new SAXException("Could not convert: " + input +
                                       " to " + type.getTypeClass());
            }
            data.setValue(conv.getResult());
        } else if (this.currentWidget instanceof BooleanField) {
            // FIXME: BooleanField should implement DataWidget, which
            // would make this case unnecessary
            if ("true".equals(input))
                this.currentWidget.setValue(Boolean.TRUE);
View Full Code Here

                newValues[i] = values[i];
            }
            newValues[valLen] = conv.getResult();
            field.setValues(newValues);
        } else if (this.currentWidget instanceof DataWidget) {
            DataWidget data = (DataWidget) this.currentWidget;
            Datatype type = data.getDatatype();
            ConversionResult conv = type.convertFromString(input, this.locale);
            if (!conv.isSuccessful()) {
                throw new SAXException("Could not convert: " + input +
                                       " to " + type.getTypeClass());
            }
            data.setValue(conv.getResult());
        } else if (this.currentWidget instanceof BooleanField) {
            // FIXME: BooleanField should implement DataWidget, which
            // would make this case unnecessary
            if ("true".equals(input))
                this.currentWidget.setValue(Boolean.TRUE);
View Full Code Here

                field.setValues(newValues);
            } else
                throw new SAXException("Could not convert: " + input +
                                       " to " + type.getTypeClass());
        } else if (this.currentWidget instanceof DataWidget) {
            DataWidget data = (DataWidget)this.currentWidget;
            Datatype type = data.getDatatype();
            ConversionResult conv =
                type.convertFromString(input, this.locale);
            if (conv.isSuccessful()) {
                data.setValue(conv.getResult());
            } else
                throw new SAXException("Could not convert: " + input +
                                       " to " + type.getTypeClass());
        } else if (this.currentWidget instanceof BooleanField) {
            // FIXME: BooleanField should implement DataWidget, which
View Full Code Here

                field.setValues(newValues);
            } else
                throw new SAXException("Could not convert: " + input +
                                       " to " + type.getTypeClass());
        } else if (this.currentWidget instanceof DataWidget) {
            DataWidget data = (DataWidget)this.currentWidget;
            Datatype type = data.getDatatype();
            ConversionResult conv =
                type.convertFromString(input, this.locale);
            if (conv.isSuccessful()) {
                data.setValue(conv.getResult());
            } else
                throw new SAXException("Could not convert: " + input +
                                       " to " + type.getTypeClass());
        } else if (this.currentWidget instanceof BooleanField) {
            // FIXME: BooleanField should implement DataWidget, which
View Full Code Here

        String input = new String(ch, start, len);
        if ("".equals(input.trim()))
            return;

        if (this.currentWidget instanceof DataWidget) {
            DataWidget data = (DataWidget)this.currentWidget;
            Datatype type = data.getDatatype();
            ConversionResult conv =
                type.convertFromString(input, this.locale);
            if (conv.isSuccessful()) {
                data.setValue(conv.getResult());
            } else
                throw new SAXException("Could not convert: " + input +
                                       " to " + type.getTypeClass());
        } else if (this.currentWidget instanceof BooleanField) {
            // FIXME: BooleanField should implement DataWidget, which
View Full Code Here

TOP

Related Classes of org.apache.cocoon.forms.formmodel.DataWidget

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.