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

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

本文整理了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

  1. /**
  2. * Reset the current history.
  3. */
  4. public void resetCurrentHistory() {
  5. historyParams.clear();
  6. String historyToken = UrlParams.generateParamsUrl(historyParams);
  7. History.newItem(historyToken, false);
  8. }

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

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

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

  1. public void newItem(String token, boolean issueEvent) {
  2. History.newItem(token, issueEvent);
  3. }
  4. }

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

  1. @Override
  2. public void onBrowserEvent(Event event) {
  3. super.onBrowserEvent(event);
  4. if (DOM.eventGetType(event) == Event.ONCLICK && impl.handleAsClick(event)) {
  5. History.newItem(getTargetHistoryToken());
  6. event.preventDefault();
  7. }
  8. }

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

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

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

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

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

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

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

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

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

  1. @Override
  2. public void onClick(ClickEvent event) {
  3. String req = ImportProjectPresenter.PLACE.getId();
  4. History.newItem(req);
  5. }
  6. });

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

  1. @Override
  2. public void onClick(ClickEvent event) {
  3. String req = ExportProjectPresenter.PLACE.getId();
  4. History.newItem(req);
  5. }
  6. });

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

  1. @Override
  2. public void onClick(ClickEvent event) {
  3. String req = OpenProjectPresenter.PLACE.getId();
  4. History.newItem(req);
  5. }
  6. });

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

  1. public void goTo( Place place )
  2. {
  3. if( activityMng.mayStop() )
  4. {
  5. String token = placeTokenizer.getToken( place );
  6. History.newItem( token );
  7. }
  8. }

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

  1. @Override
  2. public void onValueChange( ValueChangeEvent<String> event )
  3. {
  4. currentPlace = placeTokenizer.getPlace( event.getValue() );
  5. if( currentPlace == null )
  6. {
  7. History.newItem( "" );
  8. return;
  9. }
  10. activityMng.setPlace( currentPlace, this );
  11. }
  12. }

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

  1. /**
  2. * @see History#newItem(String, boolean)
  3. */
  4. public static void newItem(String historyToken, boolean fireEvent) {
  5. if (PushStateUtil.isPushStateActivated()) {
  6. maybeInitPushState();
  7. pushStateHistory.newItem(historyToken, fireEvent);
  8. }
  9. else {
  10. History.newItem(historyToken, fireEvent);
  11. }
  12. }

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

  1. @Override
  2. public void onValueChange( ValueChangeEvent<String> event )
  3. {
  4. currentPlace = placeTokenizer.getPlace( event.getValue() );
  5. if( currentPlace == null )
  6. {
  7. History.newItem( "" );
  8. return;
  9. }
  10. activityMng.setPlace( currentPlace, this );
  11. }
  12. }

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

  1. @Override
  2. public void onBrowserEvent(Event event) {
  3. super.onBrowserEvent(event);
  4. if (DOM.eventGetType(event) == Event.ONCLICK && impl.handleAsClick(event)) {
  5. History.newItem(getTargetHistoryToken());
  6. event.preventDefault();
  7. }
  8. }

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

  1. @Override
  2. public void onBrowserEvent(Event event) {
  3. super.onBrowserEvent(event);
  4. if (DOM.eventGetType(event) == Event.ONCLICK && impl.handleAsClick(event)) {
  5. History.newItem(getTargetHistoryToken());
  6. event.preventDefault();
  7. }
  8. }

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

  1. @Override
  2. public void onBrowserEvent(Event event) {
  3. super.onBrowserEvent(event);
  4. if (getTargetHistoryToken() != null) {
  5. // implementation is based on Hyperlink#onBrowserEvent
  6. if (DOM.eventGetType(event) == Event.ONCLICK && impl.handleAsClick(event)) {
  7. History.newItem(getTargetHistoryToken());
  8. event.preventDefault();
  9. }
  10. }
  11. }

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

  1. @Override
  2. public void onBrowserEvent(Event event) {
  3. super.onBrowserEvent(event);
  4. if (getTargetHistoryToken() != null) {
  5. // implementation is based on Hyperlink#onBrowserEvent
  6. if (DOM.eventGetType(event) == Event.ONCLICK && impl.handleAsClick(event)) {
  7. History.newItem(getTargetHistoryToken());
  8. event.preventDefault();
  9. }
  10. }
  11. }

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

  1. protected void update() {
  2. History.newItem( queryTokenObject.toString(), false );
  3. Window.setTitle(getCurrentTitle());
  4. notifyListeners();
  5. SweetAnalytics sweetAnalytics = new SweetAnalytics(queryTokenObject.getViewAnalytics(), queryTokenObject.getFilterAnalytics(),
  6. queryTokenObject.getInstanceAnalytics());
  7. recordAnalyticsHit(sweetAnalytics.toString());
  8. }
  9. // -- END update application methods

相关文章