Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.Hidden


  try {
    instance++;
    handler = callback;
    String request = buildCompileRequest(
        name, contents, primaryResource, resources, compiler, format);
    Hidden field = new Hidden();
    field.setName("request");
    field.setValue(request);
    VerticalPanel formContents = new VerticalPanel();
    formContents.add(field);
    form.reset();
    form.addSubmitCompleteHandler(new SubmitCompleteHandler() {
      @Override
View Full Code Here


        Collections.sort(keyList);
        for (Iterator i = keyList.iterator(); i.hasNext();) {
            String key = (String) i.next();
            String value = result.get(key);
            // GenClient.showDebug("Adding to form: key, value: [" + key + "] ["+value+"]");
            verticalPanel.add(new Hidden(key, value));
        }
        return result;
    }
View Full Code Here

        form.setMethod(METHOD_POST);
        FlowPanel panel = new FlowPanel();
        form.setWidget(panel);
        context.form = form;

        Hidden operation = new Hidden("operation");
        panel.add(operation);
        context.operation = operation;

        intro = new Label(Console.CONSTANTS.patch_manager_select_patch_body());
        panel.add(intro);
View Full Code Here

    String actionServerUrl = moduleBaseUrlWithPort + Settings.SERVLET_URL;
    formPanel.setAction(actionServerUrl);
    GenClient.showDebug("actionServerUrl: [" + actionServerUrl + "]");

    formVerticalPanel.add(action);
    formVerticalPanel.add(new Hidden(Settings.FORM_PARM_ACCESS_KEY, iCing.currentAccessKey));
    formVerticalPanel.add(new Hidden(Settings.FORM_PARM_USER_ID, iCing.currentUserId));

    formPanel.setWidget(formVerticalPanel);
    formPanel.addFormHandler(serverFormHandler);
  }
View Full Code Here

        String ensemble = icing.options.getEnsemble();
        GenClient.showDebug("verbosity: " + verbosity);
//        GenClient.showDebug("imagery: " + imagery);
        GenClient.showDebug("residue: " + residue);
        GenClient.showDebug("ensemble: " + ensemble);
        cingQueryRun.formVerticalPanel.add(new Hidden(Settings.FORM_PARM_VERBOSITY, icing.options.getVerbosity()));
//        cingQueryRun.formVerticalPanel.add(new Hidden(Settings.FORM_PARM_IMAGERY, icing.options.getImagery()));
        cingQueryRun.formVerticalPanel.add(new Hidden(Settings.FORM_PARM_RESIDUES, icing.options.getResidue()));
        cingQueryRun.formVerticalPanel.add(new Hidden(Settings.FORM_PARM_ENSEMBLE, icing.options.getEnsemble()));
        cingQueryRun.formPanel.submit();
    }
View Full Code Here

      hiddens = null;
    }
  }

  private Hidden addHidden(String name, String value) {
    Hidden hidden = new Hidden(name, value);
    uploadForm.add(hidden);
    if (hiddens == null) {
      hiddens = new ArrayList<Hidden>();
    }
    hiddens.add(hidden);
View Full Code Here

        //
        redirectForm.setMethod(FormPanel.METHOD_POST);
        redirectForm.setAction(result.providerUrl);
        redirectBody.clear();
        for (final Map.Entry<String, String> e : result.providerArgs.entrySet()) {
          redirectBody.add(new Hidden(e.getKey(), e.getValue()));
        }
        FormElement.as(redirectForm.getElement()).setTarget("_top");
        redirectForm.submit();
        break;
View Full Code Here

    NamedFrame namedFrame = ( (IFrameTabPanel) contentTabPanel.getSelectedTab().getContent() ).getFrame();
    final FormPanel form = new FormPanel( namedFrame );
    RootPanel.get().add( form );
    form.setMethod( FormPanel.METHOD_POST );
    form.setAction( url );
    form.add( new Hidden( "reportXml", URL.encode( xml ) ) ); //$NON-NLS-1$
    form.submit();
    ( (IFrameTabPanel) contentTabPanel.getSelectedTab().getContent() ).setForm( form );
  }
View Full Code Here

    final TextBox fileTextBox = new TextBox();
    fileTextBox.setHeight( "26px" );
    fileTextBox.setEnabled( false );
   
    //We use an fileNameOverride because FileUpload can only handle US character set reliably.
    final Hidden fileNameOverride = new Hidden( "fileNameOverride" );

    final FileUpload upload = new FileUpload();
    upload.setName( "fileUpload" );
    ChangeHandler fileUploadHandler = new ChangeHandler() {
      @Override
      public void onChange( ChangeEvent event ) {
        fileTextBox.setText( upload.getFilename() );
        if ( !"".equals( importDir.getValue() ) ) {
          //Set the fileNameOverride because the fileUpload object can only reliably transmit US-ASCII
          //character set.  See RFC283 section 2.3 for details
          String fileNameValue = upload.getFilename().replaceAll( "\\\\", "/" );
          fileNameValue = fileNameValue.substring( fileNameValue.lastIndexOf( "/" ) + 1 );
          fileNameOverride.setValue( fileNameValue );
          okButton.setEnabled( true );
        } else {
          okButton.setEnabled( false );
        }
      }
    };
    upload.addChangeHandler( fileUploadHandler );
    upload.setVisible( false );

    HorizontalPanel fileUploadPanel = new HorizontalPanel();
    fileUploadPanel.add( fileTextBox );
    fileUploadPanel.add( new HTML( "&nbsp;" ) );

    Button browseButton = new Button( Messages.getString( "browse" ) + "..." );
    browseButton.setStyleName( "pentaho-button" );
    fileUploadPanel.add( browseButton );
    browseButton.addClickHandler( new ClickHandler() {
      @Override
      public void onClick( ClickEvent event ) {
        setRetainOwnershipState();
        jsClickUpload( upload.getElement() );
      }
    } );

    rootPanel.add( fileUploadPanel );
    rootPanel.add( upload );

    applyAclPermissions.setName( "applyAclPermissions" );
    applyAclPermissions.setValue( Boolean.FALSE );
    applyAclPermissions.setFormValue( "false" );
    applyAclPermissions.setEnabled( true );
    applyAclPermissions.setVisible( false );

    final CheckBox overwriteAclPermissions = new CheckBox( Messages.getString( "overwriteAclPermissions" ), true );
    overwriteAclPermissions.setName( "overwriteAclPermissions" );
    applyAclPermissions.setValue( Boolean.FALSE );
    applyAclPermissions.setFormValue( "false" );
    overwriteAclPermissions.setEnabled( true );
    overwriteAclPermissions.setVisible( false );

    final Hidden overwriteFile = new Hidden( "overwriteFile" );
    overwriteFile.setValue( "true" );

    final Hidden logLevel = new Hidden( "logLevel" );
    logLevel.setValue( "ERROR" );

    final Hidden retainOwnership = new Hidden( "retainOwnership" );
    retainOwnership.setValue( "true" );
   
    rootPanel.add( applyAclPermissions );
    rootPanel.add( overwriteAclPermissions );
    rootPanel.add( overwriteFile );
    rootPanel.add( logLevel );
    rootPanel.add( retainOwnership );
    rootPanel.add( fileNameOverride );

    spacer = new VerticalPanel();
    spacer.setHeight( "4px" );
    rootPanel.add( spacer );

    DisclosurePanel disclosurePanel = new DisclosurePanel( Messages.getString( "advancedOptions" ) );
    disclosurePanel.getHeader().setStyleName( "gwt-Label" );
    HorizontalPanel mainPanel = new HorizontalPanel();
    mainPanel.add( new HTML( "&nbsp;" ) );
    VerticalPanel disclosureContent = new VerticalPanel();

    HTML replaceLabel = new HTML( Messages.getString( "fileExists" ) );
    replaceLabel.setStyleName( "gwt-Label" );
    disclosureContent.add( replaceLabel );

    final CustomListBox overwriteFileDropDown = new CustomListBox();
    final CustomListBox filePermissionsDropDown = new CustomListBox();

    DefaultListItem replaceListItem = new DefaultListItem( Messages.getString( "replaceFile" ) );
    replaceListItem.setValue( "true" );
    overwriteFileDropDown.addItem( replaceListItem );
    DefaultListItem doNotImportListItem = new DefaultListItem( Messages.getString( "doNotImport" ) );
    doNotImportListItem.setValue( "false" );
    overwriteFileDropDown.addItem( doNotImportListItem );
    overwriteFileDropDown.setVisibleRowCount( 1 );
    disclosureContent.add( overwriteFileDropDown );

    spacer = new VerticalPanel();
    spacer.setHeight( "4px" );
    disclosureContent.add( spacer );

    HTML filePermissionsLabel = new HTML( Messages.getString( "filePermissions" ) );
    filePermissionsLabel.setStyleName( "gwt-Label" );
    disclosureContent.add( filePermissionsLabel );

    DefaultListItem usePermissionsListItem = new DefaultListItem( Messages.getString( "usePermissions" ) );
    usePermissionsListItem.setValue( "false" );
    filePermissionsDropDown.addItem( usePermissionsListItem ); // If selected set "overwriteAclPermissions" to
    // false.
    DefaultListItem retainPermissionsListItem = new DefaultListItem( Messages.getString( "retainPermissions" ) );
    retainPermissionsListItem.setValue( "true" );
    filePermissionsDropDown.addItem( retainPermissionsListItem ); // If selected set "overwriteAclPermissions" to
    // true.

    final ChangeListener filePermissionsHandler = new ChangeListener() {
      @Override
      public void onChange( Widget sender ) {
        String value = filePermissionsDropDown.getSelectedItem().getValue().toString();

        applyAclPermissions.setValue( Boolean.valueOf( value ) );
        applyAclPermissions.setFormValue( value );
        overwriteAclPermissions.setFormValue( value );
        overwriteAclPermissions.setValue( Boolean.valueOf( value ) );
        setRetainOwnershipState();
      }
    };
    filePermissionsDropDown.addChangeListener( filePermissionsHandler );
    filePermissionsDropDown.setVisibleRowCount( 1 );
    disclosureContent.add( filePermissionsDropDown );

    spacer = new VerticalPanel();
    spacer.setHeight( "4px" );
    disclosureContent.add( spacer );

    HTML fileOwnershipLabel = new HTML( Messages.getString( "fileOwnership" ) );
    fileOwnershipLabel.setStyleName( "gwt-Label" );
    disclosureContent.add( fileOwnershipLabel );

    retainOwnershipDropDown.addChangeListener( new ChangeListener() {
      @Override
      public void onChange( Widget sender ) {
        String value = retainOwnershipDropDown.getSelectedItem().getValue().toString();
        retainOwnership.setValue( value );
      }
    } );
    DefaultListItem keepOwnershipListItem = new DefaultListItem( Messages.getString( "keepOwnership" ) );
    keepOwnershipListItem.setValue( "true" );
    retainOwnershipDropDown.addItem( keepOwnershipListItem );
View Full Code Here

    deleteForm.setAction(JSVarHandler.getDeployerBaseURL() + deleteProjectURL.replaceAll("/projectName/", "/" + projectName +"/"));
    deleteTitlePanel.add(deleteForm);
    final String deletedProject = projectName;
    deleteForm.addSubmitHandler(new FormPanel.SubmitHandler() {
          public void onSubmit(SubmitEvent event) {
              deleteForm.add(new Hidden("csrfmiddlewaretoken", JSVarHandler.getCSRFTokenURL()));
          }
     });
    deleteForm.addSubmitCompleteHandler(new FormPanel.SubmitCompleteHandler() {
          public void onSubmitComplete(SubmitCompleteEvent event) {
            eventBus.fireEvent(new DeleteProjectEvent(deletedProject));
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.Hidden

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.