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

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

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

History.newItem介绍

[英]Adds a new browser history entry. Calling this method will cause ValueChangeHandler#onValueChange(com.google.gwt.event.logical.shared.ValueChangeEvent)to be called as well.
[中]添加新的浏览器历史记录条目。调用此方法也会导致调用ValueChangeHandler#onValueChange(com.google.gwt.event.logical.shared.ValueChangeEvent)。

代码示例

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

/**
 * Reset the current history.
 */
public void resetCurrentHistory() {
 historyParams.clear();
 String historyToken = UrlParams.generateParamsUrl(historyParams);
 History.newItem(historyToken, false);
}

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

/**
 * Adds a new browser history entry. Calling this method will cause
 * {@link ValueChangeHandler#onValueChange(com.google.gwt.event.logical.shared.ValueChangeEvent)}
 * to be called as well.
 *
 * @param historyToken the token to associate with the new history item
 */
public static void newItem(String historyToken) {
 newItem(historyToken, true);
}

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

public void newItem(String token, boolean issueEvent) {
  History.newItem(token, issueEvent);
 }
}

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

@Override
public void onBrowserEvent(Event event) {
 super.onBrowserEvent(event);
 if (DOM.eventGetType(event) == Event.ONCLICK && impl.handleAsClick(event)) {
  History.newItem(getTargetHistoryToken());
  event.preventDefault();
 }
}

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

/**
 * Adds a new browser history entry. Calling this method will cause
 * {@link ValueChangeHandler#onValueChange(com.google.gwt.event.logical.shared.ValueChangeEvent)}
 * to be called as well.
 *
 * @param historyToken the token to associate with the new history item
 */
public static void newItem(String historyToken) {
 newItem(historyToken, true);
}

代码示例来源:origin: org.jboss.errai/errai-workspaces

private void recordHistory(String toolsetId, String toolId) {
  String toolToken = toolId != null ? toolId : "none";
  String historyToken = "errai_" + toolsetId + ";" + toolToken;
  History.newItem(historyToken, false);
}

代码示例来源:origin: com.ebmwebsourcing.geasywebeditor/webeditor-ui

@Override
public void onHide(Component component) {
  History.newItem("");
}

代码示例来源:origin: OpenNMS/opennms

@Override
public void setValue(final String value) {
  History.newItem(value);
}

代码示例来源:origin: com.ebmwebsourcing.petalsbpm/bpmn-plugins

@Override
  public void onClick(ClickEvent event) {
    
    String req = ImportProjectPresenter.PLACE.getId();
    
    History.newItem(req);
    
  }
});

代码示例来源:origin: com.ebmwebsourcing.petalsbpm/bpmn-plugins

@Override
  public void onClick(ClickEvent event) {
    
    String req = ExportProjectPresenter.PLACE.getId();
    
    History.newItem(req);
    
    
  }
});

代码示例来源:origin: com.ebmwebsourcing.petalsbpm/bpmn-plugins

@Override
  public void onClick(ClickEvent event) {
    
    String req = OpenProjectPresenter.PLACE.getId();
    
    History.newItem(req);
    
  }
});

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

public void goTo( Place place )
{
  if( activityMng.mayStop() )
  {
    String token = placeTokenizer.getToken( place );
    History.newItem( token );
  }
}

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

@Override
  public void onValueChange( ValueChangeEvent<String> event )
  {
    currentPlace = placeTokenizer.getPlace( event.getValue() );
    if( currentPlace == null )
    {
      History.newItem( "" );
      return;
    }

    activityMng.setPlace( currentPlace, this );
  }
}

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

/**
 * @see History#newItem(String, boolean) 
 */
public static void newItem(String historyToken, boolean fireEvent) {
 if (PushStateUtil.isPushStateActivated()) {
  maybeInitPushState();
  pushStateHistory.newItem(historyToken, fireEvent);      
 }
 else {
  History.newItem(historyToken, fireEvent);
 }
}

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

@Override
  public void onValueChange( ValueChangeEvent<String> event )
  {
    currentPlace = placeTokenizer.getPlace( event.getValue() );
    if( currentPlace == null )
    {
      History.newItem( "" );
      return;
    }

    activityMng.setPlace( currentPlace, this );
  }
}

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

@Override
public void onBrowserEvent(Event event) {
 super.onBrowserEvent(event);
 if (DOM.eventGetType(event) == Event.ONCLICK && impl.handleAsClick(event)) {
  History.newItem(getTargetHistoryToken());
  event.preventDefault();
 }
}

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

@Override
public void onBrowserEvent(Event event) {
 super.onBrowserEvent(event);
 if (DOM.eventGetType(event) == Event.ONCLICK && impl.handleAsClick(event)) {
  History.newItem(getTargetHistoryToken());
  event.preventDefault();
 }
}

代码示例来源:origin: org.gwtbootstrap3/gwtbootstrap3

@Override
public void onBrowserEvent(Event event) {
  super.onBrowserEvent(event);
  if (getTargetHistoryToken() != null) {
    // implementation is based on Hyperlink#onBrowserEvent
    if (DOM.eventGetType(event) == Event.ONCLICK && impl.handleAsClick(event)) {
      History.newItem(getTargetHistoryToken());
      event.preventDefault();
    }
  }
}

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

@Override
public void onBrowserEvent(Event event) {
  super.onBrowserEvent(event);
  if (getTargetHistoryToken() != null) {
    // implementation is based on Hyperlink#onBrowserEvent
    if (DOM.eventGetType(event) == Event.ONCLICK && impl.handleAsClick(event)) {
      History.newItem(getTargetHistoryToken());
      event.preventDefault();
    }
  }
}

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

protected void update() {
  History.newItem( queryTokenObject.toString(), false );
  Window.setTitle(getCurrentTitle());
  notifyListeners();
  SweetAnalytics sweetAnalytics = new SweetAnalytics(queryTokenObject.getViewAnalytics(), queryTokenObject.getFilterAnalytics(),
      queryTokenObject.getInstanceAnalytics());
  recordAnalyticsHit(sweetAnalytics.toString());
}
// -- END update application methods

相关文章