Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Subject: Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Subject: Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
Subject: - selectManyListbox + convertEntity yields convers

Subject: - selectManyListbox + convertEntity yields convers

2007-10-01       - By Jeilong

 Back
When selecting two items from selectManyListbox I get the following validation
error:
anonymous wrote : Conversion Error setting value '7 9' for '#
{workgroupSelectedStudents}'.

Evidently person with Id 7 and 9 were selected, but what is causing this
validation error? I tried overriding equals() and to match objects on their @(protected)
field. This yielded the same result. Can anyone shed some light on this? I am
deploying this on Jboss 4.2.0.GA and Seam 2.0.0.GA.

addStudent.xhtml

 | <s:validateAll>
 |   <h:outputLabel for="studentlist" value="Pick students" />
 |   <h:selectManyListbox id="studentlist" size="14" required="true" value="#
{workgroupSelectedStudents}">
 |     <s:selectItems value="#{workgroupAvailableStudents}" var="student"
label="#{student.firstName} #{student.prefix} #{student.lastName}"/>
 |     <s:convertEntity/>
 |   </h:selectManyListbox>
 | </s:validateAll>
 |

WorkgroupStudentDetail.java

 | @(protected)
 | @(protected)("workgroupStudentManager")
 | @(protected)(ScopeType.CONVERSATION)
 | @(protected)
 | public class WorkgroupStudentDetail implements
WorkgroupStudentDetailInterface {
 |   @(protected)
 |   private EntityManager entityManager;
 |
 |   @(protected)(required = false)
 |   @(protected)(required = false)
 |   private Collection<Person> workgroupAvailableStudents;
 |    
 |   @(protected)(required = false, scope = ScopeType.CONVERSATION)
 |   private Collection<Person> workgroupSelectedStudents;
 |  
 |   @(protected) (join = true, flushMode = FlushModeType.MANUAL)
 |   @(protected)("workgroupAvailableStudents")
 |   public void findStudents() {
 |     try {
 |       workgroupAvailableStudents = (Collection<Person>) entityManager
.createQuery("SELECT DISTINCT Object(per) FROM Person per").getResultList();
 |     } catch (Exception e) {
 |       log.error("Exception occurred in findStudents() [WorkgroupStudentDetail]
.", e);
 |     }
 |   }
 |
 |   // ..
 | }
 |


Person.java

 | @(protected)
 | @(protected)(name = "person")
 | public class Person implements Serializable {
 |  
 |   private static final long serialVersionUID = 7690407363935244693L;
 |   private Long personId;
 |   private School school;
 |   private String firstName;
 |   private String prefix;
 |   private String lastName;
 |   private Gender gender;
 |   private Date dateOfBirth;
 |   private String placeOfBirth;
 |   private String mobile;
 |   private String email;
 |   private String nationality;
 |   private String edexKey;
 |   private String pgnoNumber;
 |   private Date startDate;
 |   private Date endDate;
 |   private Boolean active;
 |   private Boolean critical;
 |  
 |   @(protected)
 |   public String toString() {
 |     return getPersonId() == null ? null : getPersonId().toString();
 |   }
 |  
 |   @(protected)
 |   @(protected)(strategy = GenerationType.IDENTITY)
 |   @(protected)(name = "person_id")
 |   public Long getPersonId() {
 |     return personId;
 |   }
 |  
 |   protected void setPersonId(Long personId) {
 |     this.personId = personId;
 |   }
 | // ..
 |

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic
&p=4090258#4090258

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode
=reply&p=4090258
__ ____ ____ ____ ____ ____ ____ ____ ____ ____
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user