Codota Logo
Navigation
Code IndexAdd Codota to your IDE (free)

How to use
Navigation
in
org.jboss.errai.ui.nav.client.local

Best Java code snippets using org.jboss.errai.ui.nav.client.local.Navigation (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: stackoverflow.com

 @EntryPoint
public class Bootstrap
{

  @Inject
  Navigation navigation;


  @PostConstruct
  public void buildUI()
  {
    navigation.getContentPanel().setWidth("100%");
    navigation.getContentPanel().setHeight("100%");
    RootPanel.get().add(navigation.getContentPanel());
  }

}
origin: errai/errai

 @Override
 public void callback(Navigation navigation) {
  navigation.goTo(toPageWidgetType, state);
 }
});
origin: errai/errai

 @Override
 public void callback(final Navigation navigation) {
  navigation.goToWithRole(uniquePageRole);
 }
});
origin: errai/errai

private Class<?> getCurrentPage() {
 if (navigation.getCurrentPage() != null) {
  return navigation.getCurrentPage().contentType();
 }
 else {
  // Guaranteed to exist at compile-time.
  return navigation.getPagesByRole(DefaultPage.class).iterator().next().contentType();
 }
}
origin: errai/errai

maybeAttachContentPanel();
currentPageToken = request.state;
if ((unwrappedComponent instanceof Composite) && (getCompositeWidget((Composite) unwrappedComponent) == null)) {
 final HandlerRegistration reg = widget.addAttachHandler(new Handler() {
  @Override
 pageHiding(unwrappedComponent, widget, request, fireEvent);
origin: errai/errai

/**
 * Gets the application context used in pushstate URL paths. This application context should match the deployed
 * application context in your web.xml
 *
 * @return The application context. This may return the empty String (but never null). If non-empty, the return value
 *         always starts with a slash and never ends with one.
 */
public static String getAppContext() {
 if (PushStateUtil.isPushStateActivated())
  return getAppContextFromHostPage();
 else
  return "";
}
origin: errai/errai

private Multimap<String, String> getCurrentPageState() {
 return navigation.getCurrentState();
}
origin: errai/errai

/**
 * Returns the URL path for this HistoryToken, that can be parsed by {@link HistoryTokenFactory#parseURL(String)}
 * <p>
 * This URL path includes the application context.
 */
@Override
public String toString() {
 final String url = pattern.printURL(state);
 final String context = Navigation.getAppContext();
 if (!context.isEmpty() && !url.startsWith("/")) {
  return context + "/" + url;
 }
 else {
  return context + url;
 }
}
origin: errai/errai

@Override
public void navigateBackOrHome() {
 // Guaranteed to exist at compile-time.
 final PageNode<?> defaultPageNode = navigation.getPagesByRole(DefaultPage.class).iterator().next();
 navigateBackOrToPage(defaultPageNode.contentType());
}
origin: errai/errai

/**
 * Initialize the anchor's href attribute.
 *
 * @param toPage
 *          The page type this transition goes to. Not null.
 * @param state
 *          The page state.  Cannot be null (but can be an empty multimap)
 */
private void initHref(Class<P> toPage, Multimap<String, String> state) {
 PageNode<P> toPageInstance = navigation.getNavGraph().getPage(toPage);
 HistoryToken token = htFactory.createHistoryToken(toPageInstance.name(), state);
 String href = "#" + token.toString();
 setHref(href);
}
origin: org.jboss.errai/errai-navigation

maybeAttachContentPanel();
currentPageToken = request.state;
if ((unwrappedComponent instanceof Composite) && (getCompositeWidget((Composite) unwrappedComponent) == null)) {
 final HandlerRegistration reg = widget.addAttachHandler(new Handler() {
  @Override
 pageHiding(unwrappedComponent, widget, request, fireEvent);
origin: org.jboss.errai/errai-security-client

private Class<?> getCurrentPage() {
 if (navigation.getCurrentPage() != null) {
  return navigation.getCurrentPage().contentType();
 }
 else {
  // Guaranteed to exist at compile-time.
  return navigation.getPagesByRole(DefaultPage.class).iterator().next().contentType();
 }
}
origin: org.jboss.errai/errai-navigation

/**
 * Gets the application context used in pushstate URL paths. This application context should match the deployed
 * application context in your web.xml
 *
 * @return The application context. This may return the empty String (but never null). If non-empty, the return value
 *         always starts with a slash and never ends with one.
 */
public static String getAppContext() {
 if (PushStateUtil.isPushStateActivated())
  return getAppContextFromHostPage();
 else
  return "";
}
origin: org.jboss.errai/errai-security-client

private Multimap<String, String> getCurrentPageState() {
 return navigation.getCurrentState();
}
origin: org.jboss.errai/errai-navigation

/**
 * Returns the URL path for this HistoryToken, that can be parsed by {@link HistoryTokenFactory#parseURL(String)}
 * <p>
 * This URL path includes the application context.
 */
@Override
public String toString() {
 final String url = pattern.printURL(state);
 final String context = Navigation.getAppContext();
 if (!context.isEmpty() && !url.startsWith("/")) {
  return context + "/" + url;
 }
 else {
  return context + url;
 }
}
origin: org.jboss.errai/errai-security-client

@Override
public void navigateBackOrHome() {
 // Guaranteed to exist at compile-time.
 final PageNode<?> defaultPageNode = navigation.getPagesByRole(DefaultPage.class).iterator().next();
 navigateBackOrToPage(defaultPageNode.contentType());
}
origin: org.jboss.errai/errai-navigation

/**
 * Initialize the anchor's href attribute.
 *
 * @param toPage
 *          The page type this transition goes to. Not null.
 * @param state
 *          The page state.  Cannot be null (but can be an empty multimap)
 */
private void initHref(Class<P> toPage, Multimap<String, String> state) {
 PageNode<P> toPageInstance = navigation.getNavGraph().getPage(toPage);
 HistoryToken token = htFactory.createHistoryToken(toPageInstance.name(), state);
 String href = "#" + token.toString();
 setHref(href);
}
origin: errai/errai

/**
 * Programmatically click on the anchor (with alternate page state).
 * @param state
 */
public void click(Multimap<String,String> state) {
 navigation.goTo(toPageWidgetType, state);
}
origin: org.jboss.errai/errai-navigation

 @Override
 public void callback(final Navigation navigation) {
  navigation.goToWithRole(uniquePageRole);
 }
});
origin: org.jboss.errai/errai-navigation

 @Override
 public NavigationPanel get() {
  if (!(navigation.getContentPanel() instanceof NavigationPanel)) {
   throw new RuntimeException("Default navigation panel is not of type: " + NavigationPanel.class.getName()
       + ". You replaced it with: " + navigation.getContentPanel().getClass().getName());
  }

  return (NavigationPanel) navigation.getContentPanel();
 }
}
org.jboss.errai.ui.nav.client.localNavigation

Javadoc

Central control point for navigating between pages of the application.

Configuration is decentralized: it is based on fields and annotations present in other application classes. This configuration is gathered at compile time.

Most used methods

  • getContentPanel
    Returns the panel that this Navigation object manages. The contents of this panel will be updated by
  • goTo
    Same as #goTo(Class,Multimap) but then with the page name.
  • goToWithRole
    Looks up the PageNode instance of the page that has the unique role set and makes the widget visible
  • getAppContext
    Gets the application context used in pushstate URL paths. This application context should match the
  • getAppContextFromHostPage
  • getCompositeWidget
  • getCurrentPage
    Return the current page that is being displayed.
  • getCurrentState
  • getNavGraph
    Returns the navigation graph that provides PageNode instances to this Navigation instance.
  • getPagesByRole
    Return all PageNode instances that have specified pageRole.
  • getRawAppContextFromHostPage
  • inferAppContext
  • getRawAppContextFromHostPage,
  • inferAppContext,
  • maybeAttachContentPanel,
  • maybeConvertHistoryToken,
  • maybeShowPage,
  • navigate,
  • pageHiding,
  • setAppContext,
  • setErrorHandler

Popular in Java

  • Updating database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Kernel (java.awt.image)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now