Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsf 这个经度=经度; } } 包装xxx.清单; 导入xxx.application.configuration.ISNetApp; 进口xxx.core.entities.Country; 导入xxx.core.entities.Region; 导入javax.faces.bean.ViewScoped; 导入javax.inject.inject; 导入javax.inject.Named; 导入javax.persistence.EntityManager; 导入javax.persistence.NoResultException; 导入java.io.Serializable; 导入java.util.ArrayList; 导入java.util.List; @命名 @视域 公共类地理列表实现可序列化{ @注入 实体管理器实体管理器; @注入 ISNetApp SNETAP; 私人名单国家名单; 公共列表getCountryList(){ 如果(countryList==null){ String query=“按c.ordering、c.name从国家c订单中选择c”; countryList=(列表)entityManager.createQuery(查询).getResultList(); } 返回国家列表; } 公共无效setCountryList(列表countryList){ this.countryList=countryList; } 私有列表deliveryCountryList; 公共列表getDeliveryCountryList(){ 如果(deliveryCountryList==null){ String query=“从国家/地区c中选择c,其中c.groups如“%D,%”按c.ordering、c.name排序”; deliveryCountryList=(List)entityManager.createQuery(query.getResultList(); } 返回交货国列表; } public void setDeliveryCountryList(列表deliveryCountryList){ this.deliveryCountryList=deliveryCountryList; } 公共国家/地区getCountryByIsoCode2(字符串isoCode2){ String query=“从c国选择c,其中c.isoCode2=:ic”; 试一试{ return(Country)entityManager.createQuery(query).setParameter(“ic”,isoCode2.getSingleResult(); }捕获(noresulte异常){ 返回null; } } 国家的私有列表区域; 私密的国家idcache; 私人名单区域; 公共列表getRegions(){ 返回此文件。返回区域; } 公共区域(列出区域){ 这个区域=区域; } 公共列表getRegionForCountryById(长countryId){ Country-Country=entityManager.find(Country.class,countryId.intValue()); 返回getRegionForCountry(国家/地区); } 公共列表getRegionForCountry(国家/地区){ 试一试{ System.out.println(“bbbbbbbbbbbbb”+country.toString()); //if(regionForCountry==null | | countryIdCache!=country.getId()){ regionForCountry=entityManager.createQuery(“从r区域中选择r,其中r.country.id=:countryId按r.description排序”) .setParameter(“countryId”,1)//country.getId() .getResultList(); //countryIdCache=country.getId(); //} //System.out.println(“aaaaaaaaaaaaaaaa”+regionForCountry.toString()); }catch(异常e){System.out.println(“CCCC”);返回新的ArrayList();} 返回地区为国家; } 公共无效setRegionForCountry(列出regionForCountry){ this.regionForCountry=regionForCountry; } 私人国家; 私人国家; 国家/地区(国家/地区){ 这个国家=国家; } 公共国家/地区{ 返回这个国家; } 公共国家/地区getMainCountry(){ 如果(mainCountry==null){ mainCountry=entityManager.find(Country.class,snetap.getMainCountryId()); } 返回祖国; } 公共无效设置mainCountry(国家/地区mainCountry){ this.mainCountry=mainCountry; } 私有列表特定组国家列表; 私有字符串组缓存; 公共列表getSpecificGroupCountryList(字符串组){ 如果(specificGroupCountryList==null | | groupCache==null | | groupCache.compareTo(group)!=0){ String query=“来自“%”“+group+”,“%”等组按顺序排列的国家/地区,名称”; specificGroupCountryList=(List)entityManager.createQuery(query.getResultList(); } 返回具体的国家/地区列表; } public void setSpecificGroupCountryList(列表specificGroupCountryList){ this.specificGroupCountryList=specificGroupCountryList; } }_Jsf_Jsf 2_Primefaces_Selectonemenu - Fatal编程技术网

Jsf 这个经度=经度; } } 包装xxx.清单; 导入xxx.application.configuration.ISNetApp; 进口xxx.core.entities.Country; 导入xxx.core.entities.Region; 导入javax.faces.bean.ViewScoped; 导入javax.inject.inject; 导入javax.inject.Named; 导入javax.persistence.EntityManager; 导入javax.persistence.NoResultException; 导入java.io.Serializable; 导入java.util.ArrayList; 导入java.util.List; @命名 @视域 公共类地理列表实现可序列化{ @注入 实体管理器实体管理器; @注入 ISNetApp SNETAP; 私人名单国家名单; 公共列表getCountryList(){ 如果(countryList==null){ String query=“按c.ordering、c.name从国家c订单中选择c”; countryList=(列表)entityManager.createQuery(查询).getResultList(); } 返回国家列表; } 公共无效setCountryList(列表countryList){ this.countryList=countryList; } 私有列表deliveryCountryList; 公共列表getDeliveryCountryList(){ 如果(deliveryCountryList==null){ String query=“从国家/地区c中选择c,其中c.groups如“%D,%”按c.ordering、c.name排序”; deliveryCountryList=(List)entityManager.createQuery(query.getResultList(); } 返回交货国列表; } public void setDeliveryCountryList(列表deliveryCountryList){ this.deliveryCountryList=deliveryCountryList; } 公共国家/地区getCountryByIsoCode2(字符串isoCode2){ String query=“从c国选择c,其中c.isoCode2=:ic”; 试一试{ return(Country)entityManager.createQuery(query).setParameter(“ic”,isoCode2.getSingleResult(); }捕获(noresulte异常){ 返回null; } } 国家的私有列表区域; 私密的国家idcache; 私人名单区域; 公共列表getRegions(){ 返回此文件。返回区域; } 公共区域(列出区域){ 这个区域=区域; } 公共列表getRegionForCountryById(长countryId){ Country-Country=entityManager.find(Country.class,countryId.intValue()); 返回getRegionForCountry(国家/地区); } 公共列表getRegionForCountry(国家/地区){ 试一试{ System.out.println(“bbbbbbbbbbbbb”+country.toString()); //if(regionForCountry==null | | countryIdCache!=country.getId()){ regionForCountry=entityManager.createQuery(“从r区域中选择r,其中r.country.id=:countryId按r.description排序”) .setParameter(“countryId”,1)//country.getId() .getResultList(); //countryIdCache=country.getId(); //} //System.out.println(“aaaaaaaaaaaaaaaa”+regionForCountry.toString()); }catch(异常e){System.out.println(“CCCC”);返回新的ArrayList();} 返回地区为国家; } 公共无效setRegionForCountry(列出regionForCountry){ this.regionForCountry=regionForCountry; } 私人国家; 私人国家; 国家/地区(国家/地区){ 这个国家=国家; } 公共国家/地区{ 返回这个国家; } 公共国家/地区getMainCountry(){ 如果(mainCountry==null){ mainCountry=entityManager.find(Country.class,snetap.getMainCountryId()); } 返回祖国; } 公共无效设置mainCountry(国家/地区mainCountry){ this.mainCountry=mainCountry; } 私有列表特定组国家列表; 私有字符串组缓存; 公共列表getSpecificGroupCountryList(字符串组){ 如果(specificGroupCountryList==null | | groupCache==null | | groupCache.compareTo(group)!=0){ String query=“来自“%”“+group+”,“%”等组按顺序排列的国家/地区,名称”; specificGroupCountryList=(List)entityManager.createQuery(query.getResultList(); } 返回具体的国家/地区列表; } public void setSpecificGroupCountryList(列表specificGroupCountryList){ this.specificGroupCountryList=specificGroupCountryList; } }

Jsf 这个经度=经度; } } 包装xxx.清单; 导入xxx.application.configuration.ISNetApp; 进口xxx.core.entities.Country; 导入xxx.core.entities.Region; 导入javax.faces.bean.ViewScoped; 导入javax.inject.inject; 导入javax.inject.Named; 导入javax.persistence.EntityManager; 导入javax.persistence.NoResultException; 导入java.io.Serializable; 导入java.util.ArrayList; 导入java.util.List; @命名 @视域 公共类地理列表实现可序列化{ @注入 实体管理器实体管理器; @注入 ISNetApp SNETAP; 私人名单国家名单; 公共列表getCountryList(){ 如果(countryList==null){ String query=“按c.ordering、c.name从国家c订单中选择c”; countryList=(列表)entityManager.createQuery(查询).getResultList(); } 返回国家列表; } 公共无效setCountryList(列表countryList){ this.countryList=countryList; } 私有列表deliveryCountryList; 公共列表getDeliveryCountryList(){ 如果(deliveryCountryList==null){ String query=“从国家/地区c中选择c,其中c.groups如“%D,%”按c.ordering、c.name排序”; deliveryCountryList=(List)entityManager.createQuery(query.getResultList(); } 返回交货国列表; } public void setDeliveryCountryList(列表deliveryCountryList){ this.deliveryCountryList=deliveryCountryList; } 公共国家/地区getCountryByIsoCode2(字符串isoCode2){ String query=“从c国选择c,其中c.isoCode2=:ic”; 试一试{ return(Country)entityManager.createQuery(query).setParameter(“ic”,isoCode2.getSingleResult(); }捕获(noresulte异常){ 返回null; } } 国家的私有列表区域; 私密的国家idcache; 私人名单区域; 公共列表getRegions(){ 返回此文件。返回区域; } 公共区域(列出区域){ 这个区域=区域; } 公共列表getRegionForCountryById(长countryId){ Country-Country=entityManager.find(Country.class,countryId.intValue()); 返回getRegionForCountry(国家/地区); } 公共列表getRegionForCountry(国家/地区){ 试一试{ System.out.println(“bbbbbbbbbbbbb”+country.toString()); //if(regionForCountry==null | | countryIdCache!=country.getId()){ regionForCountry=entityManager.createQuery(“从r区域中选择r,其中r.country.id=:countryId按r.description排序”) .setParameter(“countryId”,1)//country.getId() .getResultList(); //countryIdCache=country.getId(); //} //System.out.println(“aaaaaaaaaaaaaaaa”+regionForCountry.toString()); }catch(异常e){System.out.println(“CCCC”);返回新的ArrayList();} 返回地区为国家; } 公共无效setRegionForCountry(列出regionForCountry){ this.regionForCountry=regionForCountry; } 私人国家; 私人国家; 国家/地区(国家/地区){ 这个国家=国家; } 公共国家/地区{ 返回这个国家; } 公共国家/地区getMainCountry(){ 如果(mainCountry==null){ mainCountry=entityManager.find(Country.class,snetap.getMainCountryId()); } 返回祖国; } 公共无效设置mainCountry(国家/地区mainCountry){ this.mainCountry=mainCountry; } 私有列表特定组国家列表; 私有字符串组缓存; 公共列表getSpecificGroupCountryList(字符串组){ 如果(specificGroupCountryList==null | | groupCache==null | | groupCache.compareTo(group)!=0){ String query=“来自“%”“+group+”,“%”等组按顺序排列的国家/地区,名称”; specificGroupCountryList=(List)entityManager.createQuery(query.getResultList(); } 返回具体的国家/地区列表; } public void setSpecificGroupCountryList(列表specificGroupCountryList){ this.specificGroupCountryList=specificGroupCountryList; } },jsf,jsf-2,primefaces,selectonemenu,Jsf,Jsf 2,Primefaces,Selectonemenu,mbcActor是一个参数,定义如下: <ui:param name="mbcActor" value="#{registrationHelper.newActor}"/> 抽象演员: @MappedSuperclass public class AbstractActor extends AbstractGenericElement implements java.io.Serializable, IGenericElement, EmailContact { pr

mbcActor是一个参数,定义如下:

<ui:param name="mbcActor" value="#{registrationHelper.newActor}"/>

抽象演员:

@MappedSuperclass
public class AbstractActor extends AbstractGenericElement implements java.io.Serializable, IGenericElement, EmailContact {

    private static Logger log = LoggerFactory.getLogger(AbstractActor.class);

    public static enum Gender {
        Male,
        Female
    }

    /**
     * Transient
     */
    private boolean selected;

    private Integer id;
    private Long version;
    private byte type;
    private String language;
    private byte status;
    private byte publicStatus;
    private String permalink;
    private Boolean customPermalink;
    private String displayName;
    private String forename;
    private String surname;

    private Gender gender;
    private Date birthday;

    private String mobile;

    private Byte subType;

    private String stringValue1;
    private String stringValue2;
    private String stringValue3;

    @Transient
    @XmlTransient
    private Integer age;

    private String profileMessage;
    private String statusMessage;
    private String email;
    private String username;

    private String passwordHash;
    private int passwordHashIterations;
    private String salt;

    private String timezone;

    private String activationCode;
    private Boolean activationEmailSent;

    private Integer completitionPercentage;

    private Integer ordering;

    // Stats
    private ActorStats stats;

    // Extensions
    private DataActorGeo geoData;
    private DataActorExtended dataActorExtended;

    private Boolean acceptNewsletter;
    private Boolean emailAlertsEnabled;

    private Set<ActorTag> actorTags = new HashSet<ActorTag>(0);

    private List<Role> roles = new ArrayList<Role>(0);

    private Actor newDataToBeModerated;

    private Date expireDate;

    private Integer points;
    private BigDecimal wallet;

    private Byte emailAlertsType;
    private Byte emailOffersType;

    private String emailHash;

    // Data blob
    private byte[] data;

    private Set<ActorInCategory> actorInCategories = new HashSet<ActorInCategory>(
            0);

    private List<ActorAttribute> actorAttributes = new ArrayList<ActorAttribute>(0);


    public AbstractActor() {
        this.version = 1l;
        this.activationEmailSent = false;
        this.acceptNewsletter = true;
        this.emailAlertsEnabled = true;
        this.completitionPercentage = 0;
        this.customPermalink = false;
        this.wallet = new BigDecimal(0);
        this.points = 0;
        this.emailAlertsType = ActorConstants.RECURRING_EMAIL_TYPE_NONE;
        this.emailOffersType = ActorConstants.RECURRING_EMAIL_TYPE_NONE;
    }

    public AbstractActor(byte type, byte status) {
        this.version = 1l;
        this.type = type;
        this.status = status;
        this.publicStatus = ActorConstants.PUBLIC_STATUS_OFFLINE;
        this.activationEmailSent = false;
        this.acceptNewsletter = true;
        this.emailAlertsEnabled = true;
        this.completitionPercentage = 0;
        this.customPermalink = false;
        this.wallet = new BigDecimal(0);
        this.points = 0;
        this.emailAlertsType = ActorConstants.RECURRING_EMAIL_TYPE_NONE;
        this.emailOffersType = ActorConstants.RECURRING_EMAIL_TYPE_NONE;
    }

    @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
    @JoinColumn(name = "geoData", nullable = true)
    @org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
    public DataActorGeo getGeoData() {
        return this.geoData;
    }

    public void setGeoData(DataActorGeo geoData) {
        this.geoData = geoData;
    }


    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "actor")
    public Set<ActorInCategory> getActorInCategories() {
        return this.actorInCategories;
    }

    public void setActorInCategories(Set<ActorInCategory> actorInCategories) {
        this.actorInCategories = actorInCategories;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "actor")
    public List<ActorAttribute> getActorAttributes() {
        return this.actorAttributes;
    }

    public void setActorAttributes(List<ActorAttribute> actorAttributes) {
        this.actorAttributes = actorAttributes;
    }
}
@MappedSuperclass
公共类AbstractActor扩展AbstractGenericElement实现java.io.Serializable、IGenericElement、EmailContact{
私有静态记录器log=LoggerFactory.getLogger(AbstractActor.class);
公共静态枚举性别{
男,,
女性
}
/**
*短暂的
*/
选择私有布尔值;
私有整数id;
私人长版;
专用字节类型;
私有字符串语言;
专用字节状态;
私有字节状态;
私有字符串permalink;
私有布尔customPermalink;
私有字符串显示名;
私有字符串名;
私家姓;
私人性别;
私人约会生日;
私有字符串移动;
私有字节子类型;
私有字符串stringValue1;
私有字符串stringValue2;
私有字符串stringValue3;
@短暂的
@XmlTransient
私人整数年龄;
私有字符串消息;
私有字符串状态消息;
私人字符串电子邮件;
私有字符串用户名;
私有字符串密码哈希;
私有整数密码;
私盐;
专用字符串时区;
私有字符串激活码;
私有布尔激活邮件发送;
私有整数完成百分比;
私有整数排序;
//统计数据
私人ActorStats统计数据;
//扩展
专用数据源地理数据;
私有DataActorExtended DataActorExtended;
私人通讯;
私有布尔值已启用;
私有集actorTags=新哈希集(0);
私有列表角色=ne
package xxx.core.entities;

// Generated Oct 20, 2009 11:07:18 AM by Hibernate Tools 3.2.2.GA

import javax.faces.event.ValueChangeEvent;
import javax.inject.Inject;
import javax.persistence.*;

import java.util.ArrayList;
import java.util.List;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * DataActorGeo
 */
@Entity
@Table(name = "dataActorGeo")
// @org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Access(AccessType.PROPERTY)
public class DataActorGeo implements java.io.Serializable {

    private Integer id;
    private Country country;
    private Region region;
    private String city;
    private String province;
    private String address;
    private String addressLine2;
    private String postCode;
    private String nationality;
    private String phone1;
    private String phone2;

    private Double latitude;
    private Double longitude;

    private Actor actor;
    private List<Region> regions;

    @Inject
    EntityManager entityManager;

    public void updateRegions() {
        //Country ctry = (Country) event.getNewValue();
        try{
            System.out.println("bbbbbbbbbbbbbbbbbbbbbbb" + country.toString());
        //    if (regions == null) {
                this.regions = entityManager.createQuery("select r From Region r Where r.country.id = :countryId order by r.description ")
                        .setParameter("countryId", country.getId())
                        .getResultList();
                //countryIdCache = country.getId();
          //  }
            System.out.println("aaaaaaaaaaa" + regions.toString());
        } catch(Exception e){System.out.println("cccccccccc"); }//return new ArrayList<Region>(); }
        //return regions;
    }

    public DataActorGeo() {
    }

    public DataActorGeo(Country country, String city) {
        this.country = country;
        this.city = city;
    }

    public DataActorGeo(Country country, Region region, String city, String address, String postCode, String phone1, String phone2, Actor actor) {
        this.country = country;
        this.region = region;
        this.city = city;
        this.address = address;
        this.postCode = postCode;
        this.phone1 = phone1;
        this.phone2 = phone2;
        this.actor = actor;
    }

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "Country")
    // @IndexedEmbedded(prefix = "country.")
    public Country getCountry() {
        return this.country;
    }

    public void setCountry(Country country) {
        this.country = country;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "Region")
    // @IndexedEmbedded(prefix = "region.")
    public Region getRegion() {
        return this.region;
    }

    public void setRegion(Region region) {
        this.region = region;
    }

    public List<Region> getRegions()
    {
        return this.regions;
    }

    public void setRegions(List<Region> regions)
    {
        this.regions=regions;
    }

    @Column(name = "City")
    // //@Field(index = Index.UN_TOKENIZED)
    public String getCity() {
        return this.city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    @Column(name = "province")
    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    @Column(name = "address")
    // //@Field(index = Index.TOKENIZED)
    public String getAddress() {
        return this.address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Column(name = "addressLine2")
    // //@Field(index = Index.TOKENIZED)
    public String getAddressLine2() {
        return addressLine2;
    }

    public void setAddressLine2(String addressLine2) {
        this.addressLine2 = addressLine2;
    }

    @Column(name = "postCode")
    // //@Field(index = Index.UN_TOKENIZED)
    public String getPostCode() {
        return this.postCode;
    }

    public void setPostCode(String postCode) {
        this.postCode = postCode;
    }

    @Column(name = "nationality")
    // //@Field(index = Index.UN_TOKENIZED)
    public String getNationality() {
        return nationality;
    }

    public void setNationality(String nationality) {
        this.nationality = nationality;
    }

    @Column(name = "phone1")
    // //@Field(index = Index.UN_TOKENIZED)
    public String getPhone1() {
        return phone1;
    }

    public void setPhone1(String phone1) {
        this.phone1 = phone1;
    }

    @Column(name = "phone2")
    // //@Field(index = Index.UN_TOKENIZED)
    public String getPhone2() {
        return phone2;
    }

    public void setPhone2(String phone2) {
        this.phone2 = phone2;
    }

    @OneToOne(mappedBy = "geoData")
    public Actor getActor() {
        return actor;
    }

    public void setActor(Actor actor) {
        this.actor = actor;
    }

    @Column(name = "latitude")
    public Double getLatitude() {
        return latitude;
    }

    @Column(name = "longitude")
    public Double getLongitude() {
        return longitude;
    }

    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }

    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }
}









package xxx.lists;

import xxx.application.configuration.ISNetApp;
import xxx.core.entities.Country;
import xxx.core.entities.Region;

import javax.faces.bean.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Named
@ViewScoped
public class GeoLists implements Serializable {

    @Inject
    EntityManager entityManager;

    @Inject
    ISNetApp sNetApp;

    private List<Country> countryList;

    public List<Country> getCountryList() {
        if (countryList == null) {
            String query = "select c from Country c order by c.ordering, c.name";
            countryList = (List<Country>) entityManager.createQuery(query).getResultList();
        }
        return countryList;
    }

    public void setCountryList(List<Country> countryList) {
        this.countryList = countryList;
    }

    private List<Country> deliveryCountryList;

    public List<Country> getDeliveryCountryList() {
        if (deliveryCountryList == null) {
            String query = "select c from Country c where c.groups LIKE '%D,%' order by c.ordering, c.name";
            deliveryCountryList = (List<Country>) entityManager.createQuery(query).getResultList();
        }
        return deliveryCountryList;
    }

    public void setDeliveryCountryList(List<Country> deliveryCountryList) {
        this.deliveryCountryList = deliveryCountryList;
    }

    public Country getCountryByIsoCode2(String isoCode2) {
        String query = "select c from Country c where c.isoCode2=:ic";
        try {
            return (Country) entityManager.createQuery(query).setParameter("ic", isoCode2).getSingleResult();
        } catch (NoResultException e) {
            return null;
        }
    }

    private List<Region> regionForCountry;
    private int countryIdCache;

    private List<Region> regions;

    public List<Region> getRegions(){
        return this.regions;
    }

    public void setRegions(List<Region> regions){
        this.regions = regions;

    }

    public List<Region> getRegionForCountryById(Long countryId) {
        Country country = entityManager.find(Country.class, countryId.intValue());
        return getRegionForCountry(country);
    }

    public List<Region> getRegionForCountry(Country country) {
        try{
            System.out.println("bbbbbbbbbbbbbbbbbbbbbbb" + country.toString());
            //if (regionForCountry == null || countryIdCache != country.getId()) {
            regionForCountry = entityManager.createQuery("select r From Region r Where r.country.id = :countryId order by r.description ")
                    .setParameter("countryId", 1)//country.getId())
                    .getResultList();
            //  countryIdCache = country.getId();
            //}
            //  System.out.println("aaaaaaaaaaa" + regionForCountry.toString());
        } catch(Exception e){System.out.println("cccccccccc"); return new ArrayList<Region>(); }
        return regionForCountry;
    }

    public void setRegionForCountry(List<Region> regionForCountry) {
        this.regionForCountry = regionForCountry;
    }

    private Country mainCountry;

    private Country country;
    public void setCountry(Country country) {
        this.country=country;
    }

    public Country getCountry(){
        return this.country;
    }

    public Country getMainCountry() {
        if (mainCountry == null) {
            mainCountry = entityManager.find(Country.class, sNetApp.getMainCountryId());
        }
        return mainCountry;
    }

    public void setMainCountry(Country mainCountry) {
        this.mainCountry = mainCountry;
    }

    private List<Country> specificGroupCountryList;
    private String groupCache;

    public List<Country> getSpecificGroupCountryList(String group) {
        if (specificGroupCountryList == null || groupCache == null || groupCache.compareTo(group) != 0) {
            String query = "from Country where groups LIKE '%" + group + ",%' order by ordering, name";
            specificGroupCountryList = (List<Country>) entityManager.createQuery(query).getResultList();
        }
        return specificGroupCountryList;
    }

    public void setSpecificGroupCountryList(List<Country> specificGroupCountryList) {
        this.specificGroupCountryList = specificGroupCountryList;
    }

}
<ui:param name="mbcActor" value="#{registrationHelper.newActor}"/>
@MappedSuperclass
public class AbstractActor extends AbstractGenericElement implements java.io.Serializable, IGenericElement, EmailContact {

    private static Logger log = LoggerFactory.getLogger(AbstractActor.class);

    public static enum Gender {
        Male,
        Female
    }

    /**
     * Transient
     */
    private boolean selected;

    private Integer id;
    private Long version;
    private byte type;
    private String language;
    private byte status;
    private byte publicStatus;
    private String permalink;
    private Boolean customPermalink;
    private String displayName;
    private String forename;
    private String surname;

    private Gender gender;
    private Date birthday;

    private String mobile;

    private Byte subType;

    private String stringValue1;
    private String stringValue2;
    private String stringValue3;

    @Transient
    @XmlTransient
    private Integer age;

    private String profileMessage;
    private String statusMessage;
    private String email;
    private String username;

    private String passwordHash;
    private int passwordHashIterations;
    private String salt;

    private String timezone;

    private String activationCode;
    private Boolean activationEmailSent;

    private Integer completitionPercentage;

    private Integer ordering;

    // Stats
    private ActorStats stats;

    // Extensions
    private DataActorGeo geoData;
    private DataActorExtended dataActorExtended;

    private Boolean acceptNewsletter;
    private Boolean emailAlertsEnabled;

    private Set<ActorTag> actorTags = new HashSet<ActorTag>(0);

    private List<Role> roles = new ArrayList<Role>(0);

    private Actor newDataToBeModerated;

    private Date expireDate;

    private Integer points;
    private BigDecimal wallet;

    private Byte emailAlertsType;
    private Byte emailOffersType;

    private String emailHash;

    // Data blob
    private byte[] data;

    private Set<ActorInCategory> actorInCategories = new HashSet<ActorInCategory>(
            0);

    private List<ActorAttribute> actorAttributes = new ArrayList<ActorAttribute>(0);


    public AbstractActor() {
        this.version = 1l;
        this.activationEmailSent = false;
        this.acceptNewsletter = true;
        this.emailAlertsEnabled = true;
        this.completitionPercentage = 0;
        this.customPermalink = false;
        this.wallet = new BigDecimal(0);
        this.points = 0;
        this.emailAlertsType = ActorConstants.RECURRING_EMAIL_TYPE_NONE;
        this.emailOffersType = ActorConstants.RECURRING_EMAIL_TYPE_NONE;
    }

    public AbstractActor(byte type, byte status) {
        this.version = 1l;
        this.type = type;
        this.status = status;
        this.publicStatus = ActorConstants.PUBLIC_STATUS_OFFLINE;
        this.activationEmailSent = false;
        this.acceptNewsletter = true;
        this.emailAlertsEnabled = true;
        this.completitionPercentage = 0;
        this.customPermalink = false;
        this.wallet = new BigDecimal(0);
        this.points = 0;
        this.emailAlertsType = ActorConstants.RECURRING_EMAIL_TYPE_NONE;
        this.emailOffersType = ActorConstants.RECURRING_EMAIL_TYPE_NONE;
    }

    @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
    @JoinColumn(name = "geoData", nullable = true)
    @org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
    public DataActorGeo getGeoData() {
        return this.geoData;
    }

    public void setGeoData(DataActorGeo geoData) {
        this.geoData = geoData;
    }


    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "actor")
    public Set<ActorInCategory> getActorInCategories() {
        return this.actorInCategories;
    }

    public void setActorInCategories(Set<ActorInCategory> actorInCategories) {
        this.actorInCategories = actorInCategories;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "actor")
    public List<ActorAttribute> getActorAttributes() {
        return this.actorAttributes;
    }

    public void setActorAttributes(List<ActorAttribute> actorAttributes) {
        this.actorAttributes = actorAttributes;
    }
}
public AbstractActor createNewActor() {
        newActor = new AbstractActor();
    return newActor;
    }

<ui:param name="mbcActor" value="#{registrationHelper.createNewActor}"/>