-
jsp:setProperty for empty Strings
Can anybody explain why setProperty on a String property has no effect if
the value passed in is an empty string. I can see the point if it is null
(does not exist). I can also see the point if the property is not a string
since there is no logical way to convert to a Boolean etc.
In order to keep data entered across web pages I have made a very simple
UI bean where everything is a string. This ensures that even if the user
enters invalid data it will not be thrown away.
This works fine if you want to enter string properties. It also works if
you want to modify them. It breaks down completely if you want to clear out
an optional property.
I know that this behaviour is as per the JSP spec but can anybody explain
why this behaviour would be desirable.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks