errai/errai — pull request #26 by EricWittmann (2012-12-12 17:34:17+00:00)
Title: Feature Proposal: new TransitionAnchor widget in errai-navigation (revised)

#### Description
Created a new injectable widget called TransitionAnchor. This widget extends GWT's Anchor and includes the navigation boilerplate, allowing simple links to be made from Page to Page within errai-navigation.

Example:

```java
@Templated("site/dashboard.html#page")
@Page(path="dashboard", startingPage=true)
@Dependent
public class DashboardPage extends Composite {
@Inject	@DataField("aboutLink")
private TransitionAnchor aboutLink;
}
```

The above will inject an Anchor widget that, when clicked, will navigate to AboutPage.

#### What's Missing
Currently the "href" attribute of the Anchor widget is being properly set to the target page's history token. However, errai-ui's Templating system will whack the 'href' attribute and replace it with whatever is in the template. I'll bring this up in the forum or IRC to discuss possible solutions.