Hi there,
i am trying to use UriFragmentUtility in my mobile Application.
public class MyvaadinApplication extends TouchKitApplication {
/**
*
*/
private static final long serialVersionUID = 1L;
public final static UriFragmentUtility urifu = new UriFragmentUtility();
private final MyTabBarView mtbv = new MyTabBarView();
@Override
public void init() {
final MyMainWindow main = new MyMainWindow();
setMainWindow(main);
urifu.addListener(new FragmentChangedListener() {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void fragmentChanged(FragmentChangedEvent source) {
String fragment =
source.getUriFragmentUtility().getFragment();
System.out.println("URI_fragment: "+fragment);
}
});
}
@Override
public void onBrowserDetailsReady() {
mtbv.setSizeFull();
getMainWindow().addComponent(mtbv);
getMainWindow().addComponent(urifu);
}
This Works, but the TabBarView shows no Content.
To see the Content in mtbv have to change getMainWindow().addComponent(mtbv); with getMainWindow().setContent(mtbv);
@Override
public void onBrowserDetailsReady() {
mtbv.setSizeFull();
getMainWindow().setContent(mtbv);
getMainWindow().addComponent(urifu);
}
Now i get this Error:[quote]
Schwerwiegend [com.vaadin.Application]
(http–0.0.0.0-8080-1) Terminal error:: java.lang.UnsupportedOperationException: Use the specialized API instead.
at com.vaadin.addon.touchkit.ui.TabBarView.addComponent(TabBarView.java:112) [vaadin-touchkit-agpl-2.1.1.jar:2.1.1]
[/quote]
My question is:
How can use the TabBarView with UriFragmentUtility, which only works with “getMainWindow().addComponent(urifu);” ?!