com.google.gwt.user.client.History.addValueChangeHandler()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(123)

本文整理了Java中com.google.gwt.user.client.History.addValueChangeHandler()方法的一些代码示例,展示了History.addValueChangeHandler()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。History.addValueChangeHandler()方法的具体详情如下:
包路径:com.google.gwt.user.client.History
类名称:History
方法名:addValueChangeHandler

History.addValueChangeHandler介绍

[英]Adds a com.google.gwt.event.logical.shared.ValueChangeEvent handler to be informed of changes to the browser's history stack.
[中]添加一个com。谷歌。gwt。事件必然的共享。ValueChangeEvent处理程序,用于通知浏览器历史堆栈的更改。

代码示例

代码示例来源:origin: kaaproject/kaa

@Override
public void onModuleLoad() {
 HistoryHandler historyHandler = new HistoryHandler();
 History.addValueChangeHandler(historyHandler);
 updateHistoryParamsFromToken(History.getToken());
 authService.checkAuth(new AsyncCallback<AuthResultDto>() {
  @Override
  public void onFailure(Throwable caught) {
   authResult = Result.ERROR;
   showLogin();
   Utils.handleException(caught, view);
  }
  @Override
  public void onSuccess(AuthResultDto result) {
   authResult = result.getAuthResult();
   if (authResult == Result.OK) {
    redirectToModule("kaaAdmin");
   } else {
    showLogin();
    if (authResult == Result.ERROR) {
     view.setErrorMessage(Utils.messages.unexpectedError());
    } else if (authResult == Result.KAA_ADMIN_NOT_EXISTS) {
     view.setInfoMessage(Utils.messages.kaaAdminNotExists());
    }
   }
  }
 });
}

代码示例来源:origin: com.google.gwt/gwt-servlet

public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(
  ValueChangeHandler<String> valueChangeHandler) {
 return History.addValueChangeHandler(valueChangeHandler);
}

代码示例来源:origin: com.google.gwt/gwt-servlet

@Deprecated
public static void add(HistoryListener listener) {
 addValueChangeHandler(new WrapHistory(listener));
}

代码示例来源:origin: com.google.gwt/gwt-servlet

historyHandlerRegistration = History.addValueChangeHandler(new ValueChangeHandler<String>() {
 public void onValueChange(ValueChangeEvent<String> event) {
  if (autoHideOnHistoryEvents) {

代码示例来源:origin: ltearno/hexa.tools

public void init( ActivityManager<Place> activityMng, PlaceTokenizer<Place> placeTokenizer )
{
  this.activityMng = activityMng;
  this.placeTokenizer = placeTokenizer;
  History.addValueChangeHandler( this );
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(
  ValueChangeHandler<String> valueChangeHandler) {
 return History.addValueChangeHandler(valueChangeHandler);
}

代码示例来源:origin: fr.lteconsulting/hexa.core

public void init( ActivityManager<Place> activityMng, PlaceTokenizer<Place> placeTokenizer )
{
  this.activityMng = activityMng;
  this.placeTokenizer = placeTokenizer;
  History.addValueChangeHandler( this );
}

代码示例来源:origin: kiegroup/appformer

@Override
public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(final ValueChangeHandler<String> valueChangeHandler) {
  return History.addValueChangeHandler(valueChangeHandler);
}

代码示例来源:origin: stephenh/tessell

@Override
public HandlerRegistration addValueChangeHandler(final ValueChangeHandler<String> handler) {
 return History.addValueChangeHandler(handler);
}

代码示例来源:origin: dankurka/mgwt

public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(ValueChangeHandler<String> valueChangeHandler) {
  return History.addValueChangeHandler(valueChangeHandler);
}

代码示例来源:origin: mvp4g/mvp4g

public HandlerRegistration addValueChangeHandler(ValueChangeHandler<String> handler) {
 return History.addValueChangeHandler(handler);
}

代码示例来源:origin: net.wetheinter/gwt-user

public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(
  ValueChangeHandler<String> valueChangeHandler) {
 return History.addValueChangeHandler(valueChangeHandler);
}

代码示例来源:origin: org.eagle-i/eagle-i-search-gwt

private StemCellSearchApplicationState(final SearchUIConfig uiConfig) {
  this.uiConfig = uiConfig;
  History.addValueChangeHandler( this );
  setInternalRequestState( "" );
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

@Deprecated
public static void add(HistoryListener listener) {
 addValueChangeHandler(new WrapHistory(listener));
}

代码示例来源:origin: org.eagle-i/eagle-i-search-gwt

private StemCellSearchApplicationState(final String hashString, final SearchUIConfig uiConfig) {
  this.uiConfig = uiConfig;
  History.addValueChangeHandler( this );
  if ( hashString.startsWith( "#" ) ) {
    updateState( hashString.substring( 1 ) );
  } else {
    updateState( hashString );
  }
}

代码示例来源:origin: com.extjs/gxt

private Dispatcher() {
 controllers = new ArrayList<Controller>();
 history = new FastMap<AppEvent>();
 if (supportsHistory()) {
  History.addValueChangeHandler(new ValueChangeHandler<String>() {
   public void onValueChange(ValueChangeEvent<String> event) {
    String historyToken = event.getValue();
    if (history.containsKey(historyToken)) {
     dispatch(history.get(historyToken), false);
    }
   }
  });
 }
}

代码示例来源:origin: org.eagle-i/eagle-i-datatools-sweet-gwt

protected ApplicationState() {
  queryTokenObject = new QueryTokenObject();
  listeners = new ArrayList<ApplicationStateChangeListener>();
  shallowUpdateListeners = new ArrayList<ApplicationStateChangeListener>();
  History.addValueChangeHandler( this );
  providerCache = new ResourceProviderCache();
  update();
}

代码示例来源:origin: org.eagle-i/eagle-i-datatools-sweet-gwt

private ApplicationState(final String bookmark) {
  queryTokenObject = new QueryTokenObject( bookmark, true );
  listeners = new ArrayList<ApplicationStateChangeListener>();
  shallowUpdateListeners = new ArrayList<ApplicationStateChangeListener>();
  History.addValueChangeHandler( this );
  providerCache = new ResourceProviderCache();
  Window.setTitle(getCurrentTitle());
}

代码示例来源:origin: org.eagle-i/eagle-i-search-gwt

public SearchApplicationController() {
  History.addValueChangeHandler( this );
  SessionContext.INSTANCE.addListener( this );
  
  analyticsId = SearchApplicationContext.getInstance().getAnalyticsId();
}

代码示例来源:origin: errai/errai

/**
 * @see History#addValueChangeHandler(ValueChangeHandler)
 */
public static HandlerRegistration addValueChangeHandler(ValueChangeHandler<String> handler) {
 final HandlerRegistration reg;
 if (PushStateUtil.isPushStateActivated()) {
  maybeInitPushState();
  reg = pushStateHistory.addValueChangeHandler(handler);      
 }
 else {
  reg = History.addValueChangeHandler(handler);
 }
 return reg;
}

相关文章