Examples of XFormOptionsField


Examples of com.eviware.x.form.XFormOptionsField

    XFormDialog dialog = ADialogBuilder.buildDialog( GenerateForm.class );
    dialog.setValue( GenerateForm.STYLE, "One TestCase for each Operation" );
    dialog.setValue( GenerateForm.REQUEST_CONTENT, "Create new empty requests" );
    String[] names = ModelSupport.getNames( iface.getOperationList() );
    dialog.setOptions( GenerateForm.OPERATIONS, names );
    XFormOptionsField operationsFormField = ( XFormOptionsField )dialog.getFormField( GenerateForm.OPERATIONS );
    operationsFormField.setSelectedOptions( names );

    WsdlProject project = iface.getProject();
    String[] testSuites = ModelSupport.getNames( new String[] { "<create>" }, project.getTestSuiteList() );
    dialog.setOptions( GenerateForm.TESTSUITE, testSuites );

    if( dialog.show() )
    {
      List<String> operations = StringUtils.toStringList( operationsFormField.getSelectedOptions() );
      if( operations.size() == 0 )
      {
        UISupport.showErrorMessage( "No Operations selected.." );
        return null;
      }
View Full Code Here

Examples of com.eviware.x.form.XFormOptionsField

  {
    XFormDialog dialog = ADialogBuilder.buildDialog( Form.class );
    dialog.setBooleanValue( Form.ADD_ENDPOINT, true );
    String[] names = ModelSupport.getNames( iface.getOperationList() );
    dialog.setOptions( Form.OPERATIONS, names );
    XFormOptionsField operationsFormField = ( XFormOptionsField )dialog.getFormField( Form.OPERATIONS );
    operationsFormField.setSelectedOptions( names );

    dialog.getFormField( Form.START_MOCKSERVICE ).setEnabled( !atCreation );

    WsdlProject project = ( WsdlProject )iface.getProject();
    String[] mockServices = ModelSupport.getNames( new String[] { CREATE_MOCKSUITE_OPTION },
        project.getMockServiceList() );
    dialog.setOptions( Form.MOCKSERVICE, mockServices );

    dialog.setValue( Form.PATH, "/mock" + iface.getName() );
    dialog.setValue( Form.PORT, "8088" );

    if( dialog.show() )
    {
      List<String> operations = StringUtils.toStringList( operationsFormField.getSelectedOptions() );
      if( operations.size() == 0 )
      {
        UISupport.showErrorMessage( "No Operations selected.." );
        return null;
      }
View Full Code Here

Examples of com.eviware.x.form.XFormOptionsField

    return addComponent( label, new NamespaceTable( ( WsdlInterface )modelItem ) );
  }

  public void setOptions( String name, Object[] values )
  {
    XFormOptionsField combo = ( XFormOptionsField )getComponent( name );
    if( combo != null )
      combo.setOptions( values );
  }
View Full Code Here

Examples of com.eviware.x.form.XFormOptionsField

    StringList paths = new StringList();
    for( RestResource resource : service.getAllResources() )
      paths.add( resource.getName() + ": " + resource.getFullPath( false ) );

    dialog.setOptions( GenerateForm.RESOURCES, paths.toStringArray() );
    XFormOptionsField operationsFormField = ( XFormOptionsField )dialog.getFormField( GenerateForm.RESOURCES );
    operationsFormField.setSelectedOptions( paths.toStringArray() );

    WsdlProject project = service.getProject();
    String[] testSuites = ModelSupport.getNames( new String[] { "<create>" }, project.getTestSuiteList() );
    dialog.setOptions( GenerateForm.TESTSUITE, testSuites );

    if( dialog.show() )
    {
      List<String> resources = Arrays.asList( StringUtils.toStringArray( operationsFormField.getSelectedOptions() ) );
      if( resources.size() == 0 )
      {
        UISupport.showErrorMessage( "No Resources selected.." );
        return null;
      }
View Full Code Here

Examples of com.eviware.x.form.XFormOptionsField

    public XFormField addNameSpaceTable(String label, Interface modelItem) {
        return addComponent(label, new NamespaceTable((WsdlInterface) modelItem));
    }

    public void setOptions(String name, Object[] values) {
        XFormOptionsField combo = (XFormOptionsField) getComponent(name);
        if (combo != null) {
            combo.setOptions(values);
        }
    }
View Full Code Here

Examples of com.eviware.x.form.XFormOptionsField

    public void generateMockService(WsdlInterface iface, boolean atCreation) {
        XFormDialog dialog = ADialogBuilder.buildDialog(Form.class);
        dialog.setBooleanValue(Form.ADD_ENDPOINT, true);
        String[] names = ModelSupport.getNames(iface.getOperationList());
        dialog.setOptions(Form.OPERATIONS, names);
        XFormOptionsField operationsFormField = (XFormOptionsField) dialog.getFormField(Form.OPERATIONS);
        operationsFormField.setSelectedOptions(names);

        dialog.getFormField(Form.START_MOCKSERVICE).setEnabled(!atCreation);

        WsdlProject project = iface.getProject();
        String[] mockServices = ModelSupport.getNames(new String[]{CREATE_MOCKSUITE_OPTION},
                project.getMockServiceList());
        dialog.setOptions(Form.MOCKSERVICE, mockServices);

        dialog.setValue(Form.PATH, "/mock" + iface.getName());
        dialog.setValue(Form.PORT, "8088");

        if (dialog.show()) {
            List<String> operations = StringUtils.toStringList(operationsFormField.getSelectedOptions());
            if (operations.size() == 0) {
                UISupport.showErrorMessage("No Operations selected..");
                return;
            }
View Full Code Here

Examples of com.eviware.x.form.XFormOptionsField

        for (RestResource resource : service.getAllResources()) {
            paths.add(resource.getName() + ": " + resource.getFullPath(false));
        }

        dialog.setOptions(GenerateForm.RESOURCES, paths.toStringArray());
        XFormOptionsField operationsFormField = (XFormOptionsField) dialog.getFormField(GenerateForm.RESOURCES);
        operationsFormField.setSelectedOptions(paths.toStringArray());

        WsdlProject project = service.getProject();
        String[] testSuites = ModelSupport.getNames(new String[]{"<create>"}, project.getTestSuiteList());
        dialog.setOptions(GenerateForm.TESTSUITE, testSuites);

        if (dialog.show()) {
            List<String> resources = Arrays.asList(StringUtils.toStringArray(operationsFormField.getSelectedOptions()));
            if (resources.size() == 0) {
                UISupport.showErrorMessage("No Resources selected..");
                return null;
            }
View Full Code Here

Examples of com.eviware.x.form.XFormOptionsField

        XFormDialog dialog = ADialogBuilder.buildDialog(GenerateForm.class);
        dialog.setValue(GenerateForm.STYLE, "One TestCase for each Operation");
        dialog.setValue(GenerateForm.REQUEST_CONTENT, "Create new empty requests");
        String[] names = ModelSupport.getNames(iface.getOperationList());
        dialog.setOptions(GenerateForm.OPERATIONS, names);
        XFormOptionsField operationsFormField = (XFormOptionsField) dialog.getFormField(GenerateForm.OPERATIONS);
        operationsFormField.setSelectedOptions(names);

        WsdlProject project = iface.getProject();
        String[] testSuites = ModelSupport.getNames(new String[]{"<create>"}, project.getTestSuiteList());
        dialog.setOptions(GenerateForm.TESTSUITE, testSuites);

        if (dialog.show()) {
            List<String> operations = StringUtils.toStringList(operationsFormField.getSelectedOptions());
            if (operations.size() == 0) {
                UISupport.showErrorMessage("No Operations selected..");
                return null;
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.