[jboss-user] [JBoss Seam] - Re: inputText / empty string versus NULL
Thanks Matt View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4084303#4084303 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4084303 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: inputText / empty string versus NULL
I'm not certain this will work but please try and post results. Inside your entity bean change the setter method for the field you want to be null to something like this: public void setField(String field) | { | if(.equals(field)) | { | this.field = null; | } | else | { | this.field = field; | } | } View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4084017#4084017 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4084017 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: inputText / empty string versus NULL
How about using a converter that trims the field and if field.trim().equals() use null. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4084035#4084035 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4084035 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: inputText / empty string versus NULL
Try this | public void setField(String field) { | if(field == null) { | this.field = null; | } else { | if(.equals(field.trim())) { | this.field = field; | } else { | //you could trim before asignement too. | this.field = field; | } | } | } | To eliminate multiple spaces. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4084045#4084045 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4084045 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: inputText / empty string versus NULL
Haven't tried it, but found this while googling around (a more detailed version of what Jason is suggesting): http://jroller.com/stritti/entry/jsf_stringconverter_for_null_values I'd recommend not trying to solve this in your domain model. Tedious and ugly. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4084059#4084059 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4084059 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user