Package org.metaworks

Examples of org.metaworks.InputForm


             
            };
           
            ObjectInstance transformerInstance = new ObjectInstance(type, getTransformer());
           
            InputForm inputForm = new InputForm(type);
           
            inputForm.setInstance(transformerInstance);
           
            inputForm.postInputDialog(ProcessDesigner.getInstance());
           
            //inputForm.getInstance();
           
           
          } catch (Exception e1) {
View Full Code Here


          eventHandlerType = new ObjectType(EventHandler.class);
         
          ObjectInstance eventHandlerInstance = (ObjectInstance)eventHandlerType.createInstance();
          eventHandlerInstance.setObject(theEventHandler);
         
          InputForm eventHandlerInputForm = new InputForm(eventHandlerType){
            public void onSaveOK(Instance rec, JDialog dialog){
             
            }         
            public void onUpdateOK(Instance rec, JDialog dialog){
              onSaveOK(rec, dialog);
            }
          };
                 
          eventHandlerInputForm.setInstance(eventHandlerInstance);
       
          JDialog dialog=new InputDialog(eventHandlerInputForm, ProcessDesigner.getInstance()){
            //do not clear the form
            public void onSaveOK(Instance rec){
              getInputForm().onSaveOK(rec, this);
View Full Code Here

                   
                  }.run(openedForms);
                 
                  if(deployOrNot.getFieldDescriptors()==null || deployOrNot.getFieldDescriptors().length == 0) return;
                 
                  InputForm inputForm = new InputForm(deployOrNot){
                    public void onSaveOK(final Instance rec, JDialog dialog) {

                      dialog.dispose();
                     
                      SwingUtilities.invokeLater(new Runnable(){

                        public void run() {
                          new ProgressDialog("Deploy", ProcessDesigner.getInstance()){

                            public void run() throws Exception {
                              FieldDescriptor[] fds = deployOrNot.getFieldDescriptors();

                              for(int i=0; i<deployOrNot.getFieldDescriptors().length; i++){
                               
                                String fieldName = fds[i].getName();
                                Boolean value = (Boolean)rec.getFieldValue(fieldName);
                                if(value.booleanValue()){
                                  OpenedForm of = (OpenedForm) openedForms.get(fieldName);
                                  deployForm(of);
                                }
                              }
                            }
                           
                          }.show();
                        }
                       
                      });
                     
                    }

                    public void onUpdateOK(Instance rec, JDialog dialog) {
                      onUpdateOK(rec, dialog);
                    }
                  };
                 
                  inputForm.setInstance(deployInstance);
                 
                  inputForm.postInputDialog(ProcessDesigner.getInstance(), "Deploy", "Deploy");
                 
                } catch (Exception e1) {
                  // TODO Auto-generated catch block
                  e1.printStackTrace();
                }
View Full Code Here

      System.out.print(getDefinitionId());
      if (UEngineUtil.isNotEmpty(getDefinitionId())) {
        saveDialog.removeFieldDescriptor("Alias");
      }
     
      InputForm inputForm = (new InputForm(saveDialog));
     
      ProcessDefinition def = definition;

      String definitionName = def.getName().getText();
      String alias = def.getAlias();
      int version=def.getVersion();

      SaveDialogInfo defaultSettings = new SaveDialogInfo();
      defaultSettings.setName(definitionName);
      defaultSettings.setAlias(alias);
      defaultSettings.setVersion(version+1);
      defaultSettings.setAuthor(getRevisionInfo());
     
      //ObjectInstance objInstance = saveDi
     
      /*Instance defaultSettings = saveDialog.createInstance();{
        ProcessDefinition def = (ProcessDefinition)getProcessDefinitionDesigner().getActivity();
       
        String definitionName = def.getName().getText();
        String alias = def.getAlias();
        int version=def.getVersion();

        defaultSettings.setFieldValue("Name", definitionName);
        defaultSettings.setFieldValue("Alias", alias);
        defaultSettings.setFieldValue("Version", new Integer(version+1));
        defaultSettings.setFieldValue("Author", getRevisionInfo());
      }*/

      ObjectInstance objInstance = (ObjectInstance)saveDialog.createInstance();
      objInstance.setObject(defaultSettings);
      inputForm.setInstance(objInstance);       
      inputForm.postInputDialog(this, "Confirm", "Confirm", saveDialog.getName());
     
      return emptyIfSuccess.isEmpty();

  }  
View Full Code Here

        public void update(Instance rec) throws Exception{
          save(rec);
        }
      };
               
      InputForm inputForm = (new InputForm(saveDialog));
      inputForm.postInputDialog(this, "Confirm", "Confirm", saveDialog.getName());
     
    }catch( Exception ex){
      ex.printStackTrace();
    }
  }  
View Full Code Here

TOP

Related Classes of org.metaworks.InputForm

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.