Package smilehouse.gui.html.fieldbased

Examples of smilehouse.gui.html.fieldbased.FieldInfo


                    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.
                    addField(id, fieldInfo);
                }
            } catch(Exception e) {
View Full Code Here


                    };

                    BooleanEditor editor = new BooleanEditor();

                    //and finally create the configurationObject
                    FieldInfo fieldInfo = new FieldInfo(
                        RETAIN_GROUPING_ELEMENTS_ATTR,
                        RETAIN_GROUPING_ELEMENTS_ATTR,
                        modifier,
                        editor);
View Full Code Here

                    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.
                    addField(id, fieldInfo);
                }
View Full Code Here

                TextAreaEditor editor = new TextAreaEditor();
                editor.setCols(100);
                editor.setRows(30);

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

                //add the configuration to the context for usage in the http-requests.
                context.addFieldInfo(fieldInfo);
            } catch(Exception e) {
                Environment.getInstance().log(
View Full Code Here

                    };

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

                    FieldInfo fieldInfo = new FieldInfo(
                        PASSWORD_ATTR,
                        PASSWORD_ATTR,
                        modifier,
                        editor);

                    //add the configuration to the context for usage in the http-requests.
                    addField(PASSWORD_ATTR, fieldInfo);
                }
                // Import type
                {
                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            Integer value = ((DestinationIF) model)
                                .getData().getIntegerAttribute(IMPORT_MODE_ATTR);
                            return value != null ? value : new Integer(0);
                        }

                        public void setModelValue(Object model, Object value) throws Exception {
                            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,
                        modifier,
                        editor);

                    //add the configuration to the context for usage in the http-requests.
                    addField(IMPORT_MODE_ATTR, fieldInfo);
                }
                // Create product groups
                {
                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            Boolean value = ((DestinationIF) model)
                                .getData().getBooleanAttribute(CREATE_GROUPS_ATTR);
                            if(value == null)
                                value = Boolean.FALSE;
                            return value;
                        }

                        public void setModelValue(Object model, Object value) throws Exception {
                            boolean booleanValue = value != null ? ((Boolean) value).booleanValue()
                                    : false;
                            ((DestinationIF) model).getData().setAttribute(CREATE_GROUPS_ATTR, booleanValue);
                        }
                    };

                    BooleanEditor editor = new BooleanEditor();

                    FieldInfo fieldInfo = new FieldInfo(
                        CREATE_GROUPS_ATTR,
                        CREATE_GROUPS_ATTR,
                        modifier,
                        editor);

                    //add the configuration to the context for usage in the http-requests.
                    addField(CREATE_GROUPS_ATTR, fieldInfo);
                }
                // Additive group update mode
                {
                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            Boolean value = ((DestinationIF) model)
                                .getData().getBooleanAttribute(ADDITIVE_GROUP_UPDATE_ATTR);
                            if(value == null)
                                value = Boolean.FALSE;
                            return value;
                        }

                        public void setModelValue(Object model, Object value) throws Exception {
                            boolean booleanValue = value != null ? ((Boolean) value).booleanValue()
                                    : false;
                            ((DestinationIF) model).getData().setAttribute(
                                ADDITIVE_GROUP_UPDATE_ATTR,
                                booleanValue);
                        }
                    };

                    BooleanEditor editor = new BooleanEditor();

                    FieldInfo fieldInfo = new FieldInfo(
                        ADDITIVE_GROUP_UPDATE_ATTR,
                        ADDITIVE_GROUP_UPDATE_ATTR,
                        modifier,
                        editor);

                    //add the configuration to the context for usage in the http-requests.
                    addField(ADDITIVE_GROUP_UPDATE_ATTR, fieldInfo);
                }
               
                // Additive option update mode
                {
                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            Boolean value = ((DestinationIF) model)
                                .getData().getBooleanAttribute(ADDITIVE_OPTION_UPDATE_ATTR);
                            if(value == null)
                                value = Boolean.FALSE;
                            return value;
                        }

                        public void setModelValue(Object model, Object value) throws Exception {
                            boolean booleanValue = value != null ? ((Boolean) value).booleanValue()
                                    : false;
                            ((DestinationIF) model).getData().setAttribute(
                                ADDITIVE_OPTION_UPDATE_ATTR,
                                booleanValue);
                        }
                    };

                    BooleanEditor editor = new BooleanEditor();

                    FieldInfo fieldInfo = new FieldInfo(
                        ADDITIVE_OPTION_UPDATE_ATTR,
                        ADDITIVE_OPTION_UPDATE_ATTR,
                        modifier,
                        editor);

                    //add the configuration to the context for usage in the http-requests.
                    addField(ADDITIVE_OPTION_UPDATE_ATTR, fieldInfo);
                }
               
                {

                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            String protectedGroups =
                                ((PipeComponentIF) model).getData().getAttribute(PROTECTED_GROUPS_ATTR);
                            if(protectedGroups == null) {
                                return "";
                            } else {
                                return protectedGroups;
                            }
                        }

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

                    TextAreaEditor editor = new TextAreaEditor();
                    editor.setCols(70);
                    editor.setRows(10);


                    //and finally create the configurationObject
                    FieldInfo fieldInfo = new FieldInfo(
                        PROTECTED_GROUPS_ATTR,
                        PROTECTED_GROUPS_ATTR,
                        modifier,
                        editor);
View Full Code Here

                    };

                    BooleanEditor editor = new BooleanEditor();

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

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


                addSimpleTextFieldForComponent(PREFIXSTRING_ATTR, PREFIXSTRING_ATTR, 50);

                {
                    //set unique id and description labelkey
                    String id = "PSSkipFirst";
                    String label = "PSSkipFirst";

                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws FailTransferException, AbortTransferException {
                            return ((SplitConverter) model).getPSSkipFirst();
                        }

                        public void setModelValue(Object model, Object value) throws FailTransferException, AbortTransferException {
                            ((SplitConverter) model).setPSSkipFirst((Boolean) value);
                        }
                    };

                    BooleanEditor editor = new BooleanEditor();

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

                    //add the configuration to the context for usage in the http-requests.
                    addField(id, fieldInfo);
                }
View Full Code Here

                TextAreaEditor editor = new TextAreaEditor();
                editor.setCols(120);
                editor.setRows(20);

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

                //add the configuration to the context for usage in the http-requests.
                addField(id, fieldInfo);

                //add edit field for XML root element name
View Full Code Here

                    };

                    BooleanEditor editor = new BooleanEditor();

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

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

                        public void setModelValue(Object model, Object value)
                                throws FailTransferException, AbortTransferException {
                            ((LocalFileReadConverter) 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);
                   
                }
View Full Code Here

                    };

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

                    FieldInfo fieldInfo = new FieldInfo(
                        PASSWORD_ATTR,
                        PASSWORD_ATTR,
                        modifier,
                        editor);
View Full Code Here

TOP

Related Classes of smilehouse.gui.html.fieldbased.FieldInfo

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.