Package org.apache.cocoon.forms.datatype

Examples of org.apache.cocoon.forms.datatype.Datatype.convertToString()


        // Placing the handling DataWidget before ContainerWidget
        // means that an AggregateField is handled like a DataWidget
        if (widget instanceof DataWidget) {
            Datatype datatype = ((DataWidget)widget).getDatatype();
            if (widget.getValue() != null)
                data(datatype.convertToString(widget.getValue(), this.locale));
        } else if (widget instanceof BooleanField) {
            // FIXME: BooleanField should implement DataWidget, which
            // would make this case unnesecary
            if (widget.getValue() != null)
                data((Boolean)widget.getValue() == Boolean.TRUE ? "true" : "false");
View Full Code Here


            Datatype datatype = ((MultiValueField)widget).getDatatype();
            Object[] values = (Object[])widget.getValue();
            if (values != null)
                for (int i = 0; i < values.length; i++) {
                    start(ITEM, attr);
                    data(datatype.convertToString(values[i], this.locale));
                    end(ITEM);
                }
        } else if (widget instanceof ContainerWidget) {
            Iterator children = ((ContainerWidget)widget).getChildren();
            while (children.hasNext())
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.