Package smilehouse.gui.html.fieldbased.editor

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


                    public void setModelValue(Object model, Object value) throws Exception {
                        ((Pipe) model).setLoggingVerbosityLevel(((Integer) value).intValue());
                    }
                };
                SelectEditor editor = new SelectEditor();
                editor.addOption(new DefaultSelectOption(
                    new Integer(MessageLogger.LOG_ERROR),
                    "log_errors"));
                editor.addOption(new DefaultSelectOption(
                    new Integer(MessageLogger.LOG_WARNING),
                    "log_warnings"));
                editor.addOption(new DefaultSelectOption(
                    new Integer(MessageLogger.LOG_DEBUG),
                    "log_debug"));
                editor.addOption(new DefaultSelectOption(
                        new Integer(MessageLogger.LOG_DYNAMIC),
                        "log_dynamic"));
                editor.setFormatter(new IntegerFormatter());

                generalFieldsContext.addFieldInfo(new FieldInfo(id, id, modifier, editor));
            }
            {
                // -------------------------
                // Transfer log notification level drop down
                // -------------------------
                String id = NOTIFICATION_LEVEL;
                ModelModifier modifier = new DefaultModelModifier() {
                    public Object getModelValue(Object model) throws Exception {
                        return new Integer(((Pipe) model).getTransferLogNotificationLevel());
                    }

                    public void setModelValue(Object model, Object value) throws Exception {
                        ((Pipe) model).setTransferLogNotificationLevel(((Integer) value).intValue());
                    }
                };
                SelectEditor editor = new SelectEditor();
                editor.addOption(new DefaultSelectOption(
                    new Integer(MessageLogger.MAIL_ERROR),
                    "log_errors"));
                editor.addOption(new DefaultSelectOption(
                    new Integer(MessageLogger.MAIL_WARNING),
                    "log_warnings"));
                editor.addOption(new DefaultSelectOption(
                    new Integer(MessageLogger.MAIL_DEBUG),
                    "log_debug"));
                editor.addOption(new DefaultSelectOption(
                    new Integer(MessageLogger.MAIL_NONE),
                  "mail_none"));
                editor.setFormatter(new IntegerFormatter());

                generalFieldsContext.addFieldInfo(new FieldInfo(id, id, modifier, editor));
            }{
                // ----------
                // Mail server field
                // ----------
                String id = MAIL_HOST;
                ModelModifier modifier = new DefaultModelModifier() {
                    public Object getModelValue(Object model) throws Exception {
                        return ((Pipe) model).getMailHost();
                    }

                    public void setModelValue(Object model, Object value) throws Exception {
                        ((Pipe) model).setMailHost((String) value);
                    }
                };
                TextEditor editor = new TextEditor();
                editor.setSize(25);
                editor.setFormatter(new NullHidingFormatter());
                generalFieldsContext.addFieldInfo(new FieldInfo(id, id, modifier, editor));
            }{
                // ----------
                // Recipient name field
                // ----------
                String id = RECIPIENT;
                ModelModifier modifier = new DefaultModelModifier() {
                    public Object getModelValue(Object model) throws Exception {
                        return ((Pipe) model).getRecipientAddress();
                    }

                    public void setModelValue(Object model, Object value) throws Exception {
                        ((Pipe) model).setRecipientAddress((String) value);
                    }
                };
                TextEditor editor = new TextEditor();
                editor.setSize(25);
                editor.setFormatter(new NullHidingFormatter());
                generalFieldsContext.addFieldInfo(new FieldInfo(id, id, modifier, editor));
            }{
                // ----------
                // Send-mail-when-pipe-aborts checkbox
                // ----------
View Full Code Here


                            int intValue = value != null ? ((Integer) value).intValue() : 0;
                            ((DestinationIF) model).getData().setAttribute(IMPORT_MODE_ATTR, intValue);
                        }
                    };

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

                    editor.setFormatter(new IntegerFormatter());

                    //and finally create the configurationObject
                    FieldInfo fieldInfo = new FieldInfo(
                        IMPORT_MODE_ATTR,
                        IMPORT_MODE_ATTR,
View Full Code Here

                     
                      ((CustomerSource)model).setModifyOperation((String)value);
                    }
                };
               
              SelectEditor editor = new SelectEditor();
              editor.addOption(new DefaultSelectOption("OR","OR"));
              editor.addOption(new DefaultSelectOption("AND","AND"));
             
              FieldInfo fieldInfo = new FieldInfo(id,id,modifier,editor);
             
              context.addFieldInfo(fieldInfo);
             
View Full Code Here

                                CHARSET_ATTR,
                                (String) value);
                        }
                    };
                   
                    SelectEditor editor = new SelectEditor();
                    for(int i = 0; i < CHARSETS.length; i++)
                        editor.addOption(new DefaultSelectOption(CHARSETS[i], CHARSETS[i]));
                   
                    FieldInfo fieldInfo = new FieldInfo(id, id, modifier, editor);
                   
                    addField(id, fieldInfo);
                }
View Full Code Here

                                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

                            int intValue = value != null ? ((Integer) value).intValue() : 0;
                            ((DestinationIF) model).getData().setAttribute(IMPORT_MODE_ATTR, intValue);
                        }
                    };

                    SelectEditor editor = new SelectEditor();

                    for(Iterator i = IMPORT_MODES.keySet().iterator(); i.hasNext();) {
                       
                        Integer optionNumber = (Integer) i.next();
                        String optionName = (String) IMPORT_MODES.get(optionNumber);
                       
                        editor.addOption(new DefaultSelectOption(optionNumber, optionName));
                       
                    }
                   
                    editor.setFormatter(new IntegerFormatter());

                    //and finally create the configurationObject
                    FieldInfo fieldInfo = new FieldInfo(
                        IMPORT_MODE_ATTR,
                        IMPORT_MODE_ATTR,
View Full Code Here

                        public void setModelValue(Object model, Object value) throws FailTransferException, AbortTransferException {
                            ((FTPDestination) model).setFileType(((Integer) value).intValue());
                        }
                    };

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

                    editor.setFormatter(new IntegerFormatter());
                    //and finally create the configurationObject
                    FieldInfo fieldInfo = new FieldInfo(
                        FILE_TYPE_ATTR,
                        FILE_TYPE_ATTR,
                        modifier,
                        editor);

                    //add the configuration to the context for usage in the http-requests.
                    addField(FILE_TYPE_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 = ((FTPDestination) model).getData().getAttribute(
                                CHARSET_ATTR);
                            return value != null ? value : DEFAULT_CHARSET;
                        }

                        public void setModelValue(Object model, Object value)
                                throws FailTransferException, AbortTransferException {
                            ((FTPDestination) 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

                                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

                                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

TOP

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

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.