Package smilehouse.gui.html.fieldbased.editor

Examples of smilehouse.gui.html.fieldbased.editor.TextEditor


                    public void setModelValue(Object model, Object value) throws Exception {
                        ((User) model).setName((String) value);
                    }
                };
                TextEditor editor = new TextEditor();
                editor.setSize(50);

                FieldInfo fieldInfo = new FieldInfo(NAME, NAME, modifier, editor);
                userListFieldInfo.addColumn(fieldInfo);
            }
        } catch(Exception e) {
View Full Code Here


                        public void setModelValue(Object model, Object value) throws Exception {
                            ((IteratingXMLFileSource) model).setBlockSize( ((Integer) value).intValue() );
                        }
                    };

                    TextEditor editor = new TextEditor();
                    IntegerFormatter formatter = new IntegerFormatter();
                    formatter.acceptOnlyStrictlyPositive("invalid_block_size");
                    editor.setFormatter(formatter);
                    editor.setSize(5);
                   
                    FieldInfo fieldInfo = new FieldInfo(
                        BLOCK_SIZE_ATTR,
                        BLOCK_SIZE_ATTR,
                        modifier,
                        editor);

                    addField(BLOCK_SIZE_ATTR, fieldInfo);
                }
                {
                    // ----------
                    // Chop depth
                    // ----------
                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            return new Integer( ((IteratingXMLFileSource) model).getChopDepth() );
                        }

                        public void setModelValue(Object model, Object value) throws Exception {
                            ((IteratingXMLFileSource) model).setChopDepth( ((Integer) value).intValue() );
                        }
                    };

                    TextEditor editor = new TextEditor();
                    IntegerFormatter formatter = new IntegerFormatter();
                    formatter.acceptOnlyPositive("invalid_chop_depth");
                    editor.setFormatter(formatter);
                    editor.setSize(5);
                   
                    FieldInfo fieldInfo = new FieldInfo(
                        CHOP_DEPTH_ATTR,
                        CHOP_DEPTH_ATTR,
                        modifier,
                        editor);

                    addField(CHOP_DEPTH_ATTR, fieldInfo);
                }
                {
                    //set unique id and description labelkey
                    String id = CHARSET_ATTR;

                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws FailTransferException,
                                AbortTransferException {
                            String value = ((IteratingXMLFileSource) model).getData().getAttribute(
                                CHARSET_ATTR);
                            return value != null ? value : DEFAULT_CHARSET;
                        }

                        public void setModelValue(Object model, Object value)
                                throws FailTransferException, AbortTransferException {
                            ((IteratingXMLFileSource) model).getData().setAttribute(
                                CHARSET_ATTR,
                                (String) value);
                        }
                    };

                    SelectEditor editor = new SelectEditor();
                    for(int i = 0; i < CHARSETS.length; i++)
                        editor.addOption(new DefaultSelectOption(CHARSETS[i], CHARSETS[i]));

                    //and finally create the configurationObject
                    FieldInfo fieldInfo = new FieldInfo(id, id, modifier, editor);

                    //add the configuration to the context for usage in the http-requests.
View Full Code Here

                        public void setModelValue(Object model, Object value) throws Exception {
                            ((WorkspaceHQLOrderSource) model).setNewOrderHandlingStatus((String) value);
                        }
                    };
   
                    TextEditor editor = new TextEditor();
                    editor.setSize(40);
   
                    //and finally create the configurationObject
                    FieldInfo fieldInfo = new FieldInfo(
                        NEW_ORDER_HANDLING_STATUS,
                        NEW_ORDER_HANDLING_STATUS,
                        modifier,
                        editor);
   
                    //add the configuration to the context for usage in the http-requests.
                    addField(NEW_ORDER_HANDLING_STATUS, fieldInfo);
                }
                {
                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            return ((WorkspaceHQLOrderSource) model).getNewOrderPaymentStatus();
                        }
   
                        public void setModelValue(Object model, Object value) throws Exception {
                            ((WorkspaceHQLOrderSource) model).setNewOrderPaymentStatus((String) value);
                        }
                    };
   
                    TextEditor editor = new TextEditor();
                    editor.setSize(40);
   
                    //and finally create the configurationObject
                    FieldInfo fieldInfo = new FieldInfo(
                        NEW_ORDER_PAYMENT_STATUS,
                        NEW_ORDER_PAYMENT_STATUS,
View Full Code Here

                                PREFIX_ATTR,
                                (String) value);
                        }
                    };

                    TextEditor editor = new TextEditor();
                    editor.setSize(30);

                    //and finally create the configurationObject
                    FieldInfo fieldInfo = new FieldInfo(id, id, modifier, editor);

                    //add the configuration to the context for usage in the http-requests.
                    addField(id, fieldInfo);
                }
                {
                    //set unique id and description labelkey
                    String id = DATEFORMAT_ATTR;

                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            String value = ((TimestampFileDestination) model)
                                .data.getAttribute(DATEFORMAT_ATTR);
                            return value != null ? value : DEFAULT_DATEFORMAT;
                        }

                        public void setModelValue(Object model, Object value) throws Exception {
                            ((TimestampFileDestination) model).data.setAttribute(
                                DATEFORMAT_ATTR,
                                (String) value);
                        }
                    };

                    TextEditor editor = new TextEditor();
                    editor.setSize(20);

                    //and finally create the configurationObject
                    FieldInfo fieldInfo = new FieldInfo(id, id, modifier, editor);

                    //add the configuration to the context for usage in the http-requests.
                    addField(id, fieldInfo);
                }
                {
                    //set unique id and description labelkey
                    String id = EXTENSION_ATTR;

                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            String value = ((TimestampFileDestination) model)
                                .data.getAttribute(EXTENSION_ATTR);
                            return value != null ? value : "";
                        }

                        public void setModelValue(Object model, Object value) throws Exception {
                            ((TimestampFileDestination) model).data.setAttribute(
                                EXTENSION_ATTR,
                                (String) value);
                        }
                    };

                    TextEditor editor = new TextEditor();
                    editor.setSize(10);

                    //and finally create the configurationObject
                    FieldInfo fieldInfo = new FieldInfo(id, id, modifier, editor);

                    //add the configuration to the context for usage in the http-requests.
View Full Code Here

                                PREFIX_ATTR,
                                (String) value);
                        }
                    };

                    TextEditor editor = new TextEditor();
                    editor.setSize(30);

                    //and finally create the configurationObject
                    FieldInfo fieldInfo = new FieldInfo(id, id, modifier, editor);

                    //add the configuration to the context for usage in the http-requests.
                    addField(id, fieldInfo);
                }
                {
                    //set unique id and description labelkey
                    String id = COUNTERSTARTVALUE_ATTR;

                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            String value = ((MultiFileDestination) model)
                                .data.getAttribute(COUNTERSTARTVALUE_ATTR);
                            return value != null ? value : "";
                        }

                        public void setModelValue(Object model, Object value) throws Exception {
                            ((MultiFileDestination) model).data.setAttribute(
                                COUNTERSTARTVALUE_ATTR,
                                (String) value);
                        }
                    };

                    TextEditor editor = new TextEditor();
                    editor.setSize(20);

                    //and finally create the configurationObject
                    FieldInfo fieldInfo = new FieldInfo(id, id, modifier, editor);

                    //add the configuration to the context for usage in the http-requests.
                    addField(id, fieldInfo);
                }
                {
                    //set unique id and description labelkey
                    String id = EXTENSION_ATTR;

                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            String value = ((MultiFileDestination) model)
                                .data.getAttribute(EXTENSION_ATTR);
                            return value != null ? value : "";
                        }

                        public void setModelValue(Object model, Object value) throws Exception {
                            ((MultiFileDestination) model).data.setAttribute(
                                EXTENSION_ATTR,
                                (String) value);
                        }
                    };

                    TextEditor editor = new TextEditor();
                    editor.setSize(10);

                    //and finally create the configurationObject
                    FieldInfo fieldInfo = new FieldInfo(id, id, modifier, editor);

                    //add the configuration to the context for usage in the http-requests.
View Full Code Here

                        public void setModelValue(Object model, Object value) throws Exception {
                            ((LocalFileWriteConverter) model).setFileName((String) value);
                        }
                    };

                    TextEditor editor = new TextEditor();
                    editor.setSize(40);

                    //and finally create the configurationObject
                    FieldInfo fieldInfo = new FieldInfo(
                        FILENAME_ATTR,
                        FILENAME_ATTR,
                        modifier,
                        editor);

                    //add the configuration to the context for usage in the http-requests.
                    addField(FILENAME_ATTR, fieldInfo);
                }
                addSimpleTextFieldForComponent(DIRECTORY_ATTR, DIRECTORY_ATTR, 70);

                {
                    //set unique id and description labelkey
                    String id = CHARSET_ATTR;

                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            String value = ((LocalFileWriteConverter) model).getData().getAttribute(
                                CHARSET_ATTR);
                            return value != null ? value : DEFAULT_CHARSET;
                        }

                        public void setModelValue(Object model, Object value) throws Exception {
                            ((LocalFileWriteConverter) model).getData().setAttribute(
                                CHARSET_ATTR,
                                (String) value);
                        }
                    };

                    SelectEditor editor = new SelectEditor();
                    for(int i = 0; i < CHARSETS.length; i++)
                        editor.addOption(new DefaultSelectOption(CHARSETS[i], CHARSETS[i]));

                    //and finally create the configurationObject
                    FieldInfo fieldInfo = new FieldInfo(id, id, modifier, editor);

                    //add the configuration to the context for usage in the http-requests.
                    addField(id, fieldInfo);
                }
                {
                  //set unique id and description labelkey
                  String id = WRITE_TYPE_ATTR;
                 
                  ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            String value = ((LocalFileWriteConverter) model).getData().getAttribute(
                                WRITE_TYPE_ATTR);
                            return value != null ? value : WRITE_TYPE_ALWAYS_OVERWRITE;
                        }

                        public void setModelValue(Object model, Object value) throws Exception {
                            ((LocalFileWriteConverter) model).getData().setAttribute(
                                WRITE_TYPE_ATTR,
                                (String) value);
                        }
                    };

                    SelectEditor editor = new SelectEditor();
                    editor.addOption(new DefaultSelectOption(WRITE_TYPE_ALWAYS_OVERWRITE, WRITE_TYPE_ALWAYS_OVERWRITE));
                    editor.addOption(new DefaultSelectOption(WRITE_TYPE_ALWAYS_APPEND, WRITE_TYPE_ALWAYS_APPEND));
                    editor.addOption(new DefaultSelectOption(WRITE_TYPE_ITERATION_START_OVERWRITE, WRITE_TYPE_ITERATION_START_OVERWRITE));
                   
                    //and finally create the configurationObject
                    FieldInfo fieldInfo = new FieldInfo(id, id, modifier, editor);

                    //add the configuration to the context for usage in the http-requests.
View Full Code Here

TOP

Related Classes of smilehouse.gui.html.fieldbased.editor.TextEditor

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.