Sha256: 55ffe04fee6036e3cc135c0afb033368175bd88ed12056d737b280de43c12e27

Contents?: true

Size: 727 Bytes

Versions: 1

Compression:

Stored size: 727 Bytes

Contents

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<User> {

    @Inject
    ApplicationLinksPanel(SessionManager<User> sessionManager) {
        super(sessionManager);
    }

    @Override
    protected void initUser(User user) {
        for(Application app: user.applications){
            addLink(app.getName().equals("THIS") ? 
                    "users" : 
                    app.getName(), app.getUrl());
        }
    }

}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
resty-generators-0.7.3 lib/generators/resty/setup/templates/ApplicationLinksPanel.java~