[jboss-user] [JBoss Seam] - Re: Displaying dataTable row numbers with uiComponent, what
Oberiko
do-not-reply at jboss.com
Wed Jan 23 12:47:37 EST 2008
I've tried without the <h:output /> (so that it looked exactly as the demo) and had the same result.
Nothing special about person, it's a fairly standard basic entity bean:
| package org.domain.myProject.entity;
|
| import java.util.ArrayList;
| import java.util.Collection;
|
| import javax.persistence.CascadeType;
| import javax.persistence.Entity;
| import javax.persistence.GeneratedValue;
| import javax.persistence.Id;
| import javax.persistence.OneToMany;
|
| import org.hibernate.validator.NotNull;
| import org.jboss.seam.annotations.Name;
|
| @Entity
| @Name("person")
| public class Person {
|
| @Id @GeneratedValue
| private Long id;
|
| @NotNull
| private String name;
|
| @OneToMany(cascade = CascadeType.ALL, mappedBy="person")
| private Collection<EmailAddress> emailAddresses;
|
| public Long getId() {return id;}
| public void setId(Long id) {this.id = id;}
|
| public String getName() {return name;}
| public void setName(String name) {this.name = name;}
|
| public Collection<EmailAddress> getEmailAddresses() {
| return emailAddresses;
| }
| public void setEmailAddresses(Collection<EmailAddress> emailAddresses) {
| this.emailAddresses = emailAddresses;
| }
| public void addEmailAddress(EmailAddress email){
| if (emailAddresses == null) emailAddresses= new ArrayList<EmailAddress>();
| email.setPerson(this);
| emailAddresses.add(email);
| }
| public void removeEmailAddress(EmailAddress emailAddress){
| if (emailAddresses != null){
| emailAddresses.remove(emailAddress);
| }
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122741#4122741
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122741
More information about the jboss-user
mailing list