0

With Errai-UI how do you set manually the hash for each pages.

For example:

MainPage.java
MainPage.html

The hash would be #MainPage

How can I change it to #!MainPage ?

1 Answers1

1

You can set the hash with the path attribute of the @Page annotation. In answer to your specific question, do this:

@Templated
@Page(path="!MainPage")
public class MainPage extends Composite {
  // ...
}
Jonathan Fuerth
  • 2,080
  • 2
  • 18
  • 21
  • Although, since the `#!` technique is an official thing for web crawlers and so on, it would be reasonable to request an Errai feature to support this. Some sort of global configuration flag like `org.jboss.errai.ui.nav.USE_HASHBANG=true`. Come discuss on our IRC channel or our errai-dev mailing list! – Jonathan Fuerth May 10 '13 at 14:26
  • You mean file a JIRA issue? – quarks May 11 '13 at 00:46
  • Our IRC channel is [#errai on Freenode](irc://irc.freenode.net/#errai) and our mailing lists are listed [on our community page](http://www.jboss.org/errai/Community/MailingLists). You are always welcome to just file a JIRA, but this request could probably benefit from a bit of discussion. – Jonathan Fuerth May 13 '13 at 16:12