}));
parent.appendChild("<div>Y.Router test - press the buttons to change route, and test back-forward browser buttons.</div>");
content = parent.appendChild("<div>initial content</div>");
RouteCallback callback1 = new RouteCallback() {
@Override
public void call(RouteRequest req, RouteResponse res, SimpleCallback next) {
content.empty();
content.append("<div>route 1 sais hello. Path: " + req.path() + "</div>");
}
};
RouteCallback callback2 = new RouteCallback() {
@Override
public void call(RouteRequest req, RouteResponse res, SimpleCallback next) {
content.empty();
content.append("<div " + "style='background-color: red; color: white; font-weight: bold'>"
+ "route 2 sais hello. Path: " + req.path() + ". Editing user id: "