-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate Validation problem
PostPosted: Fri Feb 08, 2008 5:27 pm 
Newbie

Joined: Thu Jan 31, 2008 3:58 pm
Posts: 3
I am using Java EE with Hibernate, JSF and Seam.
I have a bean with properties of type Integer. They used to be Boolean but I had to change them to Integer because I am using DB2 and DB2 doesnt accepts booleans.

Since <h:selectBooleanCheckbox> only works with Boolean types in the backing bean, I have decided to use <h:selectOneRadio> to serve the same purpose. Now, I have a problem with that. I dont know if its a validation issue or what but when I click the submit button to submit the form, nothing happens. I'm just learning EJB programming and this problem has completely stopped my progress.

Code:
@Entity
@Name("cheese")
@Table(name="cheeses")
public class Customer implements Serializable {
   
   private Integer isCheddar;

         public Integer getIsCheddar() {
      return isCheddar;
   }

   public void setIsCheddar(Integer isCheddar) {
      this.isCheddar= isCheddar;
   }
}



cheese.xhtml

Code:
<h:selectOneRadio id="radioCheeseType" value="#{cheese.isCheddar}" required="no" converter="javax.faces.Integer">
                     <f:selectItem id="item1" itemLabel="" itemValue="1" />
                     <s:convertEntity />
</h:selectOneRadio>



Can someone please help me with this and tell me what's wrong. I do not see any error messages on my console so I have no idea what the problem is. Thanks a lot![/code]


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.