Package com.smartgwt.client.widgets.form.events

Examples of com.smartgwt.client.widgets.form.events.ItemChangedHandler


          FavouritesListGrid.this.collapseRecord(record);
          FavouritesListGrid.this.expandRecord(record);
        }
      });

      form.addItemChangedHandler(new ItemChangedHandler() {
        public void onItemChanged(ItemChangedEvent event) {
          if (saveButton.isDisabled()) {
            saveButton.setDisabled(false);
            cancelButton.setDisabled(false);
          }
View Full Code Here


    layout.addMember(enabledForm);
    layout.addMember(disabledForm);
    setCanvas(layout);

    enabledForm.addItemChangedHandler(new ItemChangedHandler() {

      public void onItemChanged(ItemChangedEvent event) {
        String disabledValue = (event.getNewValue() == null ? null : event.getNewValue().toString());
        disabledForm.getItem(FORM_FIELD_NAME).setValue(disabledValue);
      }
View Full Code Here

  // ------------------------------------------------------------------------
  // Method overriding:
  // ------------------------------------------------------------------------

  public HandlerRegistration addChangedHandler(final ChangedHandler handler) {
    return enabledForm.addItemChangedHandler(new ItemChangedHandler() {

      public void onItemChanged(ItemChangedEvent event) {
        handler.onChanged(new ChangedEvent(EnableToggleFormItem.this.getJsObj()));
      }
    });
View Full Code Here

    private class OkButton extends IButton implements ClickHandler {

      public OkButton() {
        super("Ok");
        setWidth(60);
        attributeTable.addItemChangedHandler(new ItemChangedHandler() {

          public void onItemChanged(ItemChangedEvent event) {
            if (attributeTable.validate()) {
              setDisabled(false);
            } else {
View Full Code Here

    public SaveButton() {
      setIcon("[ISOMORPHIC]/geomajas/osgeo/save1.png");
      setShowDisabledIcon(false);
      setTitle(I18nProvider.getAttribute().btnSaveTitle());
      setTooltip(I18nProvider.getAttribute().btnSaveTooltip());
      attributeTable.addItemChangedHandler(new ItemChangedHandler() {

        public void onItemChanged(ItemChangedEvent event) {
          if (attributeTable.validate()) {
            setDisabled(false);
          } else {
View Full Code Here

   * com.smartgwt.client.widgets.form.events .ItemChangedHandler)
   */
  public HandlerRegistration addItemChangedHandler(ItemChangedHandler handler) {
    MultiHandlerRegistration registration = new MultiHandlerRegistration();
    // Due to custom made FormItems, we can't set the handler on the form anymore...
    final ItemChangedHandler itemChangedHandler = handler;
    registration.addRegistration(manager.addHandler(ItemChangedEvent.getType(), handler));
    for (final FormItem formItem : formWidget.getFields()) {
      ChangedHandler h = new ChangedHandler() {

        public void onChanged(ChangedEvent event) {
          itemChangedHandler.onItemChanged(new ItemChangedEvent(formItem.getJsObj()));
        }
      };
      registration.addRegistration(formItem.addChangedHandler(h));
    }
    return registration;
View Full Code Here

        }
        updateButtonState(false);
      }
    });

    detailForm.addItemChangedHandler(new ItemChangedHandler() {

      public void onItemChanged(ItemChangedEvent event) {
        updateButtonState(true);
      }
    });
View Full Code Here

                                popup.destroy();
                            }
                        });

                        form.addItemChangedHandler(new ItemChangedHandler() {
                            public void onItemChanged(ItemChangedEvent itemChangedEvent) {
                                Object newValue = itemChangedEvent.getNewValue();
                                newMemberPropertySimple.setValue(newValue);

                                // Only enable the OK button, allowing the user to add the property to the map, if the
View Full Code Here

                popup.destroy();
            }
        });

        // Only enable the OK button if all properties are valid.
        childForm.addItemChangedHandler(new ItemChangedHandler() {
            public void onItemChanged(ItemChangedEvent itemChangedEvent) {
                // TODO (ips, 03/14/11): Ideally, we would validate the form here, but it's preventing boolean prop
                //                       radio buttons from being selectable, most likely due to a SmartGWT bug.
                //okButton.setDisabled(!childForm.validate());
                okButton.setDisabled(false);
View Full Code Here

        form.setDataSource(this.dataSource);

        List<FormItem> items = createFormItems(form);
        form.setFields(items.toArray(new FormItem[items.size()]));

        form.addItemChangedHandler(new ItemChangedHandler() {
            public void onItemChanged(ItemChangedEvent event) {
                AbstractRecordEditor.this.onItemChanged();
            }
        });
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.form.events.ItemChangedHandler

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.