List of usage examples for com.google.gwt.event.logical.shared ValueChangeEvent fire
public static <T> void fire(HasValueChangeHandlers<T> source, T value)
From source file:io.apiman.manager.ui.client.local.pages.org.MemberCard.java
License:Apache License
/** * Called when the user clicks the "Revoke All" button. * @param event/*from ww w . j ava 2 s. c om*/ */ @EventHandler("revokeButton") public void onRevoke(ClickEvent event) { applyButton.setEnabled(false); cancelButton.setEnabled(false); revokeButton.onActionStarted(); // TODO replace this with a bootstrap modal yes/no dialog! if (Window.confirm("This will remove the user from all roles in the Organization. Really do this?")) { //$NON-NLS-1$ // Firing with a null value is a signal to the page that the user wants to delete the card. ValueChangeEvent.fire(this, null); } }
From source file:io.apiman.manager.ui.client.local.pages.org.UserSelector.java
License:Apache License
/** * @see com.google.gwt.user.client.ui.HasValue#setValue(java.lang.Object, boolean) *///from ww w .j a v a 2s .co m @Override public void setValue(UserBean value, boolean fireEvents) { this.value = value; if (fireEvents) { ValueChangeEvent.fire(this, value); } }
From source file:io.apiman.manager.ui.client.local.pages.policy.forms.BasicAuthPolicyConfigForm.java
License:Apache License
/** * @see com.google.gwt.user.client.ui.HasValue#setValue(java.lang.Object, boolean) *//*from w w w. j a v a 2 s.c o m*/ @Override public void setValue(String value, boolean fireEvents) { staticIdentities.clear(); staticClear.setEnabled(false); staticRemove.setEnabled(false); staticAdd.setEnabled(false); staticUsername.setValue(""); //$NON-NLS-1$ staticPassword.setValue(""); //$NON-NLS-1$ ldapDnPattern.setValue(""); //$NON-NLS-1$ ldapUrl.setValue(""); //$NON-NLS-1$ if (value != null && !value.trim().isEmpty()) { BasicAuthenticationConfig config = marshaller.unmarshal(value, BasicAuthenticationConfig.class); realm.setValue(config.getRealm()); authenticatedUserHeader.setValue(config.getForwardIdentityHttpHeader()); StaticIdentitySource staticIdentity = config.getStaticIdentity(); if (staticIdentity != null) { List<StaticIdentity> identities = staticIdentity.getIdentities(); Set<String> sorted = new TreeSet<String>(); for (StaticIdentity identity : identities) { String val = identity.getUsername() + ":" + identity.getPassword(); //$NON-NLS-1$ sorted.add(val); } for (String val : sorted) { staticIdentities.addItem(val); } staticClear.setEnabled(true); this.identitySourceSelector.setValue("Static"); //$NON-NLS-1$ this.showSubForm("Static"); //$NON-NLS-1$ } LDAPIdentitySource ldapIdentity = config.getLdapIdentity(); if (ldapIdentity != null) { ldapDnPattern.setValue(ldapIdentity.getDnPattern()); ldapUrl.setValue(ldapIdentity.getUrl()); this.identitySourceSelector.setValue("LDAP"); //$NON-NLS-1$ this.showSubForm("LDAP"); //$NON-NLS-1$ } JDBCIdentitySource jdbcIdentity = config.getJdbcIdentity(); if (jdbcIdentity != null) { jdbcDatasource.setValue(jdbcIdentity.getDatasourcePath()); jdbcSqlQuery.setValue(jdbcIdentity.getQuery()); jdbcHashAlgorithm.setValue(jdbcIdentity.getHashAlgorithm()); this.identitySourceSelector.setValue("JDBC"); //$NON-NLS-1$ this.showSubForm("JDBC"); //$NON-NLS-1$ } } checkValidity(); if (fireEvents) { ValueChangeEvent.fire(this, value); } }
From source file:io.apiman.manager.ui.client.local.pages.policy.forms.CachingPolicyConfigForm.java
License:Apache License
/** * @see com.google.gwt.user.client.ui.HasValue#setValue(java.lang.Object, boolean) */// w w w. j a va 2 s . c o m @Override public void setValue(String value, boolean fireEvents) { ttl.setValue(""); //$NON-NLS-1$ checkValidity(); if (value != null && !value.trim().isEmpty()) { CachingConfig config = marshaller.unmarshal(value, CachingConfig.class); ttl.setValue(String.valueOf(config.getTtl())); } if (fireEvents) { ValueChangeEvent.fire(this, value); } }
From source file:io.apiman.manager.ui.client.local.pages.policy.forms.JsonSchemaPolicyConfigurationForm.java
License:Apache License
/** * @see com.google.gwt.user.client.ui.HasValue#setValue(java.lang.Object, boolean) *//*from w w w .jav a 2s . c o m*/ @Override public void setValue(String value, boolean fireEvents) { this.value = value; if (value == null) { this.value = "{}"; //$NON-NLS-1$ } if (editor != null) { _setEditorValue(this.value); } if (fireEvents) { ValueChangeEvent.fire(this, value); } }
From source file:io.apiman.manager.ui.client.local.pages.policy.forms.RateLimitingPolicyConfigForm.java
License:Apache License
/** * @see com.google.gwt.user.client.ui.HasValue#setValue(java.lang.Object, boolean) *///ww w . j ava2s . c om @Override public void setValue(String value, boolean fireEvents) { limit.setValue(""); //$NON-NLS-1$ userHeader.setValue(""); //$NON-NLS-1$ // TODO set the granularity based on the form context - are we adding a policy for a service, app, or plan? granularity.setValue(RateLimitingGranularity.Application); period.setValue(RateLimitingPeriod.Month); hideRow("userRow"); //$NON-NLS-1$ if (value != null && !value.trim().isEmpty()) { RateLimitingConfig config = marshaller.unmarshal(value, RateLimitingConfig.class); limit.setValue(String.valueOf(config.getLimit())); granularity.setValue(config.getGranularity()); period.setValue(config.getPeriod()); if (config.getGranularity() == RateLimitingGranularity.User && config.getUserHeader() != null) { userHeader.setValue(config.getUserHeader()); showRow("userRow"); //$NON-NLS-1$ } } checkValidity(); if (fireEvents) { ValueChangeEvent.fire(this, value); } }
From source file:io.apiman.manager.ui.client.local.pages.service.ImportServicesTable.java
License:Apache License
/** * Fires a value change event when something changes. */ protected void fireChangeEvent() { ValueChangeEvent.fire(this, selectedServices); }
From source file:io.apiman.manager.ui.client.local.pages.service.ServicePlansSelector.java
License:Apache License
/** * @see com.google.gwt.user.client.ui.HasValue#setValue(java.lang.Object, boolean) *//* ww w.ja v a 2 s . c om*/ @Override public void setValue(Set<ServicePlanBean> value, boolean fireEvents) { this.value = value; if (fireEvents) { ValueChangeEvent.fire(this, value); } }
From source file:io.apiman.manager.ui.client.local.widgets.ChevronToggleAnchor.java
License:Apache License
/** * @see com.google.gwt.user.client.ui.HasValue#setValue(java.lang.Object, boolean) *//* w ww . ja v a 2 s .com*/ @Override public void setValue(Boolean value, boolean fireEvents) { this.open = value; if (fireEvents) { ValueChangeEvent.fire(this, open); } }
From source file:io.apiman.manager.ui.client.local.widgets.DroppableTextArea.java
License:Apache License
/** * Called when the user drops a file.//from w w w.j a v a2 s . c o m * * @param event */ protected void doDrop(DropEvent event) { setValue(""); //$NON-NLS-1$ handleFiles(event.getDataTransfer()); if (droppedFile != null) { droppedFile.readAsText(new IDataReadHandler() { @Override public void onDataLoaded(String data) { setValue(data); ValueChangeEvent.fire(DroppableTextArea.this, getValue()); } }); } }