Package org.openblend.fejstbuk.ui

Source Code of org.openblend.fejstbuk.ui.Profile

package org.openblend.fejstbuk.ui;

import javax.enterprise.context.RequestScoped;
import javax.inject.Named;

import org.openblend.fejstbuk.domain.User;

/**
* @author <a href="mailto:ales.justin@jboss.org">Ales Justin</a>
*/
@RequestScoped
@Named("profile")
public class Profile extends AbstractUI {
    public String addFriend(long friendId) {
        User friend = em.find(User.class, friendId);
        dao.addFriend(current, friend);
        return "home.xhtml";
    }

    public String removeFriend(long friendId) {
        User friend = em.find(User.class, friendId);
        dao.removeFriend(current, friend);
        return "home.xhtml";
    }
}
TOP

Related Classes of org.openblend.fejstbuk.ui.Profile

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.