Private Proxies – Buy Cheap Private Elite USA Proxy + 50% Discount!Private Proxies – Buy Cheap Private Elite USA Proxy + 50% Discount!Private Proxies – Buy Cheap Private Elite USA Proxy + 50% Discount!Private Proxies – Buy Cheap Private Elite USA Proxy + 50% Discount!
    0
  •   was successfully added to your cart.
  • Home
  • Buy proxies
  • Extra features
  • Help
  • Contact
  • Login
  • 50% OFF
    BUY NOW!
    50
    PROXIES
    $19
    --------------------
    BUY NOW!
    BUY NOW!
    BUY NOW!
    BUY NOW!
    BUY NOW!
    $29
    $49
    $109
    $179
    $299
    --------------------
    --------------------
    --------------------
    --------------------
    --------------------
    PROXIES
    PROXIES
    PROXIES
    PROXIES
    PROXIES
    100
    200
    500
    1,000
    2,000
    TOP SELLER
    BEST VALUE
    For All Private Proxies!

Fala ai pessoal! Estou com um problema para popular um DataTable, estou usando JSf, CDI.

Eu acredito que o nome do professor está vindo normal pois ele é um objeto e o aluno é um List, mas nãos ei como resolver isso. Eu estou tentando buscar o atributo nome na classe Usuario que pertence ao Aluno da seguinte forma:

GestaoProjetosBean(meu bean de projetos) -> Aluno.java -> Usuario.java -> nome

Essa é minha página que estou com problemas para trazer o nome do aluno do banco, pois o nome do professor está vindo normal.

GestaoProjetos.xhtml

<!DOCTYPE html> <ui:composition xmlns="http://www.w3.org/1999/xhtml"  	xmlns:h="http://xmlns.jcp.org/jsf/html"  	xmlns:f="http://xmlns.jcp.org/jsf/core"  	xmlns:p="http://primefaces.org/ui"  	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"  	template="/WEB-INF/template/Layout.xhtml">  	 <ui:define name="titulo"> 	<title>Gestão Projetos</title> </ui:define> <ui:define name="conteudo">  	<f:metadata> 		<f:viewAction action="#{gestaoProjetosBean.todosProjetos}" /> 	</f:metadata>  <p:dataTable id="projetosDataTable" value="#{gestaoProjetosBean.listaProjetos}" 			var="projeto" emptyMessage="Nenhuma informação a ser exibida" 			paginator="true" rows="10" paginatorPosition="bottom" 			selectionMode="single" selection="#{gestaoProjetosBean.projeto}" rowKey="#{projeto.id}"> 			 			<p:ajax event="rowSelect" update="frm:toolbar" /> 			 			<p:ajax event="rowUnselect" update="frm:toolbar" /> 			 			<p:column headerText="Título" sortBy="#{projeto.titulo}"> 				<h:outputText value="#{projeto.titulo}" /> 			</p:column> 			<!--AQUI O PROFESSOR VEM NORMAL --> 			<p:column headerText="Professor responsável"> 				<h:outputText value="#{projeto.professor.usuario.nome}" /> 			</p:column> 			<!-- AQUI  É O PROBLEMA QUE NÃO VEM O NOME ALUNO --> 			<p:column headerText="Aluno" > 				<h:outputText value="#{projeto.aluno.usuario.nome}" /> 			</p:column> 			  		</p:dataTable> </ui:composition>

GestaoProjetosBean.java(Meu bean)

@Named @ViewScoped public class GestaoProjetosBean implements Serializable {  private static final long serialVersionUID = 1L;      @Inject     private Projetos projetos;      @Inject     private FacesMessages messages;      @Inject     private CadastroProjetoService cadastroProjetoService;      private List<Projeto> listaProjetos;      private String termoPesquisa;      private Projeto projeto;       public void prepararNovoProjeto() {         projeto = new Projeto();         this.projeto.setUsuario(new Usuario());         //this.projeto.setAluno(new Aluno());         this.projeto.setProfessor(new Professor());      }      public void prepararEdicao() {      }      public void salvar() {         cadastroProjetoService.salvar(projeto);          atualizarRegistros();          messages.info("Projeto salvo com sucesso!");          RequestContext.getCurrentInstance().update(Arrays.asList(                 "frm:monografiasDataTable", "frm:messages"));     }      public void excluir() {         cadastroProjetoService.excluir(projeto);          projeto = null;          atualizarRegistros();          messages.info("Projeto excluída com sucesso!");     }      public void pesquisar() {         listaProjetos = projetos.pesquisar(termoPesquisa);          if (listaProjetos.isEmpty()) {             messages.info("Sua consulta não retornou registros.");         }     }      public void todosProjetos() {         listaProjetos = projetos.todas();     }      private void atualizarRegistros() {         if (jaHouvePesquisa()) {             pesquisar();         } else {             todosProjetos();         }     }      private boolean jaHouvePesquisa() {         return termoPesquisa != null && !"".equals(termoPesquisa);     }      public List<Projeto> getListaProjetos() {         return listaProjetos;     }      public String getTermoPesquisa() {         return termoPesquisa;     }      public void setTermoPesquisa(String termoPesquisa) {         this.termoPesquisa = termoPesquisa;     }      public Projeto getProjeto() {         return projeto;     }      public void setProjeto(Projeto projeto) {         this.projeto = projeto;     }      public boolean isProjetoSeleciona() {         return projeto != null && projeto.getId() != null;     }    } 

Aluno.java

@Entity @Table(name="aluno") public class Aluno implements Serializable{  private static final long serialVersionUID = 1L;  @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id;  @NotNull @OneToOne(cascade = CascadeType.ALL) @JoinColumn(name = "usuario_id", nullable = false) private Usuario usuario;  public Long getId() {     return id; }  public void setId(Long id) {     this.id = id; }  public Usuario getUsuario() {     return usuario; }  public void setUsuario(Usuario usuario) {     this.usuario = usuario; }  @Override public int hashCode() {     final int prime = 31;     int result = 1;     result = prime * result + ((id == null) ? 0 : id.hashCode());     return result; }  @Override public boolean equals(Object obj) {     if (this == obj)         return true;     if (obj == null)         return false;     if (getClass() != obj.getClass())         return false;     Aluno other = (Aluno) obj;     if (id == null) {         if (other.id != null)             return false;     } else if (!id.equals(other.id))         return false;     return true; }  @Override public String toString() {     return "Aluno [id=" + id + "]"; }   } 

Usuario.java

@Entity @Table(name="usuario") public class Usuario implements Serializable {  private static final long serialVersionUID = 1L;  @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id;  @NotEmpty @Column(nullable = false, length = 40) private String nome;  @NotEmpty @Email @Column(nullable = false, length = 40) private String email;  @NotNull @Column(nullable = false, length = 8) private Long matricula;  @NotEmpty @Column(nullable = false, length = 8) private String senha;  @Column(name = "ultimo_acessso") @Temporal(TemporalType.DATE) private Date ultimoAcesso;  @Transient private Professor professor; @Transient private List <Aluno> aluno;  public Usuario() {     super();  }  public Usuario(Long matricula, String senha) {     super();     this.matricula = matricula;     this.senha = senha;  }  public Long getId() {     return id; }  public void setId(Long id) {     this.id = id; }  public String getSenha() {     return senha; }  public void setSenha(String senha) {     this.senha = senha; }  public Date getUltimoAcesso() {     return ultimoAcesso; }  public void setUltimoAcesso(Date ultimoAcesso) {     this.ultimoAcesso = ultimoAcesso; }  public Long getMatricula() {     return matricula; }  public void setMatricula(Long matricula) {     this.matricula = matricula; }  public String getNome() {     return nome; }  public void setNome(String nome) {     this.nome = nome; }  public String getEmail() {     return email; }  public void setEmail(String email) {     this.email = email; }  public Professor getProfessor() {     return professor; }  public void setProfessor(Professor professor) {     this.professor = professor; }  public List<Aluno> getAluno() {     return aluno; }  public void setAluno(List<Aluno> aluno) {     this.aluno = aluno; }  @Override public int hashCode() {     final int prime = 31;     int result = 1;     result = prime * result + ((id == null) ? 0 : id.hashCode());     return result; }  @Override public boolean equals(Object obj) {     if (this == obj)         return true;     if (obj == null)         return false;     if (getClass() != obj.getClass())         return false;     Usuario other = (Usuario) obj;     if (id == null) {         if (other.id != null)             return false;     } else if (!id.equals(other.id))         return false;     return true; }  @Override public String toString() {     return "Usuario [id=" + id + "]"; }  } 

Projeto.java

@Entity @Table(name = "projeto") public class Projeto implements Serializable {  private static final long serialVersionUID = 1L;  @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id;  @NotEmpty @Column(nullable = false, length = 120) private String titulo;  @NotEmpty @Column(nullable = false) private String descricao;  @NotNull @ManyToOne(cascade = CascadeType.ALL) @JoinColumn(name = "professor_id", nullable = false) private Professor professor;   @ManyToMany @JoinTable(name="projeto_aluno", joinColumns= {@JoinColumn(name="projeto_id")}, inverseJoinColumns= {@JoinColumn(name="aluno_id")}) private List <Aluno> aluno;  @Transient private Usuario usuario;  public Long getId() {     return id; }  public void setId(Long id) {     this.id = id; }  public String getTitulo() {     return titulo; }  public void setTitulo(String titulo) {     this.titulo = titulo; }  public String getDescricao() {     return descricao; }  public void setDescricao(String descricao) {     this.descricao = descricao; }  public Professor getProfessor() {     return professor; }  public void setProfessor(Professor professor) {     this.professor = professor; }  public List<Aluno> getAluno() {     return aluno; }  public void setAluno(List<Aluno> aluno) {     this.aluno = aluno; }  public Usuario getUsuario() {     return usuario; }  public void setUsuario(Usuario usuario) {     this.usuario = usuario; }  @Override public int hashCode() {     final int prime = 31;     int result = 1;     result = prime * result + ((id == null) ? 0 : id.hashCode());     return result; }  @Override public boolean equals(Object obj) {     if (this == obj)         return true;     if (obj == null)         return false;     if (getClass() != obj.getClass())         return false;     Projeto other = (Projeto) obj;     if (id == null) {         if (other.id != null)             return false;     } else if (!id.equals(other.id))         return false;     return true; }  @Override public String toString() {     return "Projeto [id=" + id + "]"; } } 

✓ Extra quality

ExtraProxies brings the best proxy quality for you with our private and reliable proxies

✓ Extra anonymity

Top level of anonymity and 100% safe proxies – this is what you get with every proxy package

✓ Extra speed

1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!

50 proxies

$19/month

50% DISCOUNT!
$0.38 per proxy
✓ Private
✓ Elite
✓ Anonymous
Buy now

100 proxies

$29/month

50% DISCOUNT!
$0.29 per proxy
✓ Private
✓ Elite
✓ Anonymous
Buy now

200 proxies

$49/month

50% DISCOUNT!
$0.25 per proxy
✓ Private
✓ Elite
✓ Anonymous
Buy now

500 proxies

$109/month

50% DISCOUNT!
$0.22 per proxy
✓ Private
✓ Elite
✓ Anonymous
Buy now

1,000 proxies

$179/month

50% DISCOUNT!
$0.18 per proxy
✓ Private
✓ Elite
✓ Anonymous
Buy now

2,000 proxies

$299/month

50% DISCOUNT!
$0.15 per proxy
✓ Private
✓ Elite
✓ Anonymous
Buy now

USA proxy location

We offer premium quality USA private proxies – the most essential proxies you can ever want from USA

100% anonymous

Our proxies have TOP level of anonymity + Elite quality, so you are always safe and secure with your proxies

Unlimited bandwidth

Use your proxies as much as you want – we have no limits for data transfer and bandwidth, unlimited usage!

Superfast speed

Superb fast proxy servers with 1,000 mb/s speed – sit back and enjoy your lightning fast private proxies!

99,9% servers uptime

Alive and working proxies all the time – we are taking care of our servers so you can use them without any problems

No usage restrictions

You have freedom to use your proxies with every software, browser or website you want without restrictions

Perfect for SEO

We are 100% friendly with all SEO tasks as well as internet marketing – feel the power with our proxies

Big discounts

Buy more proxies and get better price – we offer various proxy packages with great deals and discounts

Premium support

We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!

Satisfaction guarantee

24/7 premium support, free proxy activation and 100% safe payments! Best reliability private proxies for your needs!

Best Proxy Packs

  • 2,000 Private Proxies $600.00 $299.00 / month
  • 1,000 Private Proxies $360.00 $179.00 / month

Quick Links

  • More information
  • Contact us
  • Privacy Policy
  • Terms and Conditions

Like And Follow Us


Copyright ExtraProxies.com | All Rights Reserved.
  • Checkout
  • Contact
  • Help
  • Home
  • My Account
  • My Cart
  • News
  • Privacy Policy
  • Proxy features
  • Proxy packs
  • Terms and Conditions
Private Proxies – Buy Cheap Private Elite USA Proxy + 50% Discount!
    0 items