The setAllProperties tag

Overview

This tag is designed to work around an issue with the <jsp:setProperty> tag. Namely the <jsp:setProperty> tag does not set properties if a parameter is null or “”. Because of this it makes update form validation difficult because empty form fields are not passed to the bean. This means that the data the bean has and the data on the form do not match.This tag performs the same function as <jsp:setProperty name=”xxx” property=”*”/> but also sets “” values, on the bean.Tag Usage

Tag usage:

<jee:setAllProperties name="beanInstanceName"/>· 

name – This is name of the bean instance to set the properties on.

Example

The following code shows an example of using this tag:

<%@ taglib uri="jeenius" prefix="jee" %>
<jsp:useBean id="myBean" class="example.MyBean"/>
<jee:setAllProperties name="myBean"/> ... // rest of page goes
here < Return to the tag index >