package com.example.client; import javax.inject.Singleton; import com.example.client.models.Application; import com.example.client.models.User; import com.google.inject.Inject; import de.mkristian.gwt.rails.session.SessionManager; import de.mkristian.gwt.rails.views.LinksPanel; @Singleton public class ApplicationLinksPanel extends LinksPanel { @Inject ApplicationLinksPanel(SessionManager sessionManager) { super(sessionManager); } @Override protected void initUser(User user) { for(Application app: user.applications){ addLink(app.getName().equals("THIS") ? "users" : app.getName(), app.getUrl()); } } }