private void maybeConvertHistoryToken(String token) { if (PushStateUtil.isPushStateActivated()) { if (token == null || token.isEmpty()) { return; } if (token.startsWith("#")) { token = token.substring(1); } HistoryWrapper.newItem(Window.Location.getPath() + token, false); } }
private void maybeConvertHistoryToken(String token) { if (PushStateUtil.isPushStateActivated()) { if (token == null || token.isEmpty()) { return; } if (token.startsWith("#")) { token = token.substring(1); } HistoryWrapper.newItem(Window.Location.getPath() + token, false); } }
private <C> void handleQueuedRequests(final Request<C> request, final boolean fireEvent) { if (queuedRequests.isEmpty()) { // No new navigation requests were recorded in the lifecycle methods. // This is the page which has to be displayed and the browser's history // can be updated. redirectDepth = 0; HistoryWrapper.newItem(request.state.toString(), fireEvent); } else { // Process all navigation requests captured in the lifecycle methods. while (queuedRequests.size() != 0) { navigate(queuedRequests.poll(), fireEvent); } } }
private <C> void handleQueuedRequests(final Request<C> request, final boolean fireEvent) { if (queuedRequests.isEmpty()) { // No new navigation requests were recorded in the lifecycle methods. // This is the page which has to be displayed and the browser's history // can be updated. redirectDepth = 0; HistoryWrapper.newItem(request.state.toString(), fireEvent); } else { // Process all navigation requests captured in the lifecycle methods. while (queuedRequests.size() != 0) { navigate(queuedRequests.poll(), fireEvent); } } }
/** * Update the state of your existing page without performing a full navigation. * <br/> * This will perform a pseudo navigation updating the history token with the new states. */ public void updateState(Multimap<String, String> state) { if(currentPage != null) { currentPageToken = historyTokenFactory.createHistoryToken(currentPage.name(), state); HistoryWrapper.newItem(currentPageToken.toString(), false); currentPage.pageUpdate(currentComponent, currentPageToken); } else { logger.error("Cannot update the state before a page has loaded."); } }
/** * Update the state of your existing page without performing a full navigation. * <br/> * This will perform a pseudo navigation updating the history token with the new states. */ public void updateState(Multimap<String, String> state) { if(currentPage != null) { currentPageToken = historyTokenFactory.createHistoryToken(currentPage.name(), state); HistoryWrapper.newItem(currentPageToken.toString(), false); currentPage.pageUpdate(currentComponent, currentPageToken); } else { logger.error("Cannot update the state before a page has loaded."); } }