[jboss-user] [JBoss Seam] - Re: inputText / empty string versus NULL
goku2
do-not-reply at jboss.com
Thu Sep 13 12:00:21 EDT 2007
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=bb&op=viewtopic&p=4084045#4084045
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084045
More information about the jboss-user
mailing list