Package smilehouse.gui.html.fieldbased.editor

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


            public void setModelValue(Object model, Object value) throws Exception {
              ((JDBCSource) model).setXMLdeclarationForEachBlock((Boolean) value);
            }
          };

          BooleanEditor editor = new BooleanEditor();

          FieldInfo fieldInfo = new FieldInfo(XMLDECLARATION_FOR_EACH_BLOCK_ATTR, XMLDECLARATION_FOR_EACH_BLOCK_ATTR, modifier, editor);
          addField(XMLDECLARATION_FOR_EACH_BLOCK_ATTR, fieldInfo);
        }
      } catch (Exception e) {
View Full Code Here


                        public void setModelValue(Object model, Object value) throws Exception {
                            ((WorkspaceHQLSource) model).setXMLdeclarationForEachBlock((Boolean) value);
                        }
                    };

                    BooleanEditor editor = new BooleanEditor();

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

                        public void setModelValue(Object model, Object value) throws Exception {
                            ((HTTPDestination) model).setAcceptSelfSignedCertificates((Boolean) value);
                        }
                    };

                    BooleanEditor editor = new BooleanEditor();

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

                    addField(ACCEPTSELFSIGNEDCERTIFICATES_ATTR, fieldInfo);
                }
                {
                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            return ((HTTPDestination) model).getLogEnabled();
                        }

                        public void setModelValue(Object model, Object value) throws Exception {
                            ((HTTPDestination) model).setLogEnabled((Boolean)value);
                        }
                    };

                    BooleanEditor editor = new BooleanEditor();

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

                    addField(LOG_ATTR, fieldInfo);
                }
               
                {
                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            return ((HTTPDestination) model).getResponseCodeCheckDisabled();
                        }

                        public void setModelValue(Object model, Object value) throws Exception {
                            ((HTTPDestination) model).setResponseCodeCheckDisabled((Boolean)value);
                        }
                    };

                    BooleanEditor editor = new BooleanEditor();

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

                    addField(DISABLE_RESPONSE_CODE_CHECK_ATTR, fieldInfo);
                }

               
               
                addSimpleTextFieldForComponent(PATH_ATTR, PATH_ATTR, 40);
                addSimpleTextFieldForComponent(NAME_ATTR, NAME_ATTR, 20);
                addSimpleTextFieldForComponent(SOAPACTION_ATTR,SOAPACTION_ATTR, 40);
                addSimpleTextFieldForComponent(CONTENT_TYPE_ATTR,CONTENT_TYPE_ATTR, 40);
               
               
                {
                    //set unique id and description labelkey
                    String id = CHARSET_ATTR;

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

                        public void setModelValue(Object model, Object value)
                                throws FailTransferException, AbortTransferException {
                            ((HTTPDestination) 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);
                }
               
                {
                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            return ((HTTPDestination) model).getChosenResponseCharset();
                        }

                        public void setModelValue(Object model, Object value) throws Exception {
                            ((HTTPDestination) model).setChosenResponseCharset((Boolean)value);
                        }
                    };

                    BooleanEditor editor = new BooleanEditor();

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

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

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

                        public void setModelValue(Object model, Object value)
                                throws FailTransferException, AbortTransferException {
                            ((HTTPDestination) model).getData().setAttribute(
                                RESPONSE_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 {
                        ((Pipe) model).setHttpStartEnabled(((Boolean) value).booleanValue());
                    }
                };
                BooleanEditor editor = new BooleanEditor();
                generalFieldsContext.addFieldInfo(new FieldInfo(id, id, modifier, editor));
            }
            {
                // -------------------------
                // Verbosity level drop down
                // -------------------------
                String id = VERBOSITY_LEVEL;
                ModelModifier modifier = new DefaultModelModifier() {
                    public Object getModelValue(Object model) throws Exception {
                        return new Integer(((Pipe) model).getLoggingVerbosityLevel());
                    }

                    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
                // ----------
                String id = ENABLE_ABORT_MAIL;
                ModelModifier modifier = new DefaultModelModifier() {
                    public Object getModelValue(Object model) throws Exception {
                        return ((Pipe) model).isAbortMailEnabled();
                    }

                    public void setModelValue(Object model, Object value) throws Exception {
                        ((Pipe) model).setAbortMailEnabled(((Boolean) value).booleanValue());
                    }
                };
                BooleanEditor editor = new BooleanEditor();
                generalFieldsContext.addFieldInfo(new FieldInfo(id, id, modifier, editor));
          
                }

        } catch(Exception e) {
View Full Code Here

                                    : true;
                            ((DestinationIF) model).getData().setAttribute(ADDITIVE_ANSWER_UPDATE_ATTR, booleanValue);
                        }
                    };

                    BooleanEditor editor = new BooleanEditor();

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

                    //add the configuration to the context for usage in the http-requests.
                    addField(ADDITIVE_ANSWER_UPDATE_ATTR, fieldInfo);
                }
                // Additive basket update checkbox
                {
                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            Boolean value = ((DestinationIF) model)
                                .getData().getBooleanAttribute(ADDITIVE_BASKET_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_BASKET_UPDATE_ATTR,
                                booleanValue);
                        }
                    };

                    BooleanEditor editor = new BooleanEditor();

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

                    //add the configuration to the context for usage in the http-requests.
                    addField(ADDITIVE_BASKET_UPDATE_ATTR, fieldInfo);
                }
               
                // Invoke received events checkbox
                {
                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            Boolean value = ((DestinationIF) model)
                                .getData().getBooleanAttribute(INVOKE_RECEIVED_EVENTS_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(
                                INVOKE_RECEIVED_EVENTS_ATTR,
                                booleanValue);
                        }
                    };

                    BooleanEditor editor = new BooleanEditor();

                    FieldInfo fieldInfo = new FieldInfo(
                        INVOKE_RECEIVED_EVENTS_ATTR,
                        INVOKE_RECEIVED_EVENTS_ATTR,
                        modifier,
View Full Code Here

                        public void setModelValue(Object model, Object value) throws Exception {
                            ((CSVtoXMLConverter) model).setReadFieldNamesFromCSV((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);
                }

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

                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            return ((CSVtoXMLConverter) model).getSkipCSVHeaderLine();
                        }

                        public void setModelValue(Object model, Object value) throws Exception {
                            ((CSVtoXMLConverter) model).setSkipCSVHeaderLine((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.
View Full Code Here

                        public void setModelValue(Object model, Object value) throws Exception {
                            ((LocalFileDestination) model).setAppend((Boolean) value);
                        }
                    };

                    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);
                }
                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 = ((LocalFileDestination) model).getData().getAttribute(
                                CHARSET_ATTR);
                            return value != null ? value : DEFAULT_CHARSET;
                        }

                        public void setModelValue(Object model, Object value) throws Exception {
                            ((LocalFileDestination) 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);
                }
                {
                    String id = STARTSTRING_ATTR;
                   
                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            String value = ((LocalFileDestination) model).getData().getAttribute(
                                STARTSTRING_ATTR);
                            return value != null ? value : "";
                        }

                        public void setModelValue(Object model, Object value) throws Exception {
                            ((LocalFileDestination) model).getData().setAttribute(
                                STARTSTRING_ATTR,
                                (String) value);
                       
                    };
                    TextAreaEditor editor = new TextAreaEditor();
                    editor.setCols(40);
                    editor.setRows(2);

                    //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);
                }
                {
                    String id = ENDSTRING_ATTR;
                   
                    ModelModifier modifier = new DefaultModelModifier() {
                        public Object getModelValue(Object model) throws Exception {
                            String value = ((LocalFileDestination) model).getData().getAttribute(
                                ENDSTRING_ATTR);
                            return value != null ? value : "";
                        }

                        public void setModelValue(Object model, Object value) throws Exception {
                            ((LocalFileDestination) model).getData().setAttribute(
                                ENDSTRING_ATTR,
                                (String) value);
                       
                    };
                    TextAreaEditor editor = new TextAreaEditor();
                    editor.setCols(40);
                    editor.setRows(2);

                    //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 {
                            ((HTTPSource) model).setChosenResponseCharset((Boolean)value);
                        }
                    };

                    BooleanEditor editor = new BooleanEditor();

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

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

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

                        public void setModelValue(Object model, Object value)
                                throws FailTransferException, AbortTransferException {
                            ((HTTPSource) model).getData().setAttribute(
                                RESPONSE_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

                                    : false;
                            ((DestinationIF) model).getData().setAttribute(CREATE_GROUPS_ATTR, booleanValue);
                        }
                    };

                    BooleanEditor editor = new BooleanEditor();

                    FieldInfo fieldInfo = new FieldInfo(
                        CREATE_GROUPS_ATTR,
                        CREATE_GROUPS_ATTR,
                        modifier,
View Full Code Here

                                RETAIN_GROUPING_ELEMENTS_ATTR,
                                ((Boolean) value).booleanValue());
                        }
                    };

                    BooleanEditor editor = new BooleanEditor();

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

TOP

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

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.