Petr Tomasek wrote: >>Anyway, if you create a new bean for each request (as in your example), >>you just have to be aware of this and initialize the properties to >>the "unset" value you want (e.g. an empty string for a String property). >>Thus, if the setter method is not called by <jsp:setProperty>, your >>getter method still returns the default value you want. > > > Isn't it possible to just use another JSP tag? I think there should be some > tag library, that behaves like the <jsp:setProperty />, but treats empty > strings as values and forces properties to be set. > > I wonder if there is special tag like: > > <betterjsp:setProperty name="myBean" property="+ACo-" /> > > This special tag would take every property from the request and call the > setter on each property. Values could be then deleted in the form, not only > changed to non-empty strings. > > Dont you know of any tag library, that addresses this issue?
Well, there's no standard (JSP or JSTL) action that works like you want, but you may be able to find one if you search for it (e.g. using Google or go to the resource sites listed at Sun's JSP page). I have never seen or heard about one, though. On the other hand, it's not so hard to implement a custom action that does this, so that's another option if you don't like the suggestion I made for solving the problem while still using <jsp:setProperty>. Hans -- Hans Bergsten hans+AEA-gefionsoftware.com Gefion Software http://www.gefionsoftware.com JavaServer Pages http://TheJSPBook.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
