>
>     Nicolas>        String setterName = "set"
>     Nicolas>           + arg.substring(0,1).toUpperCase()
>     Nicolas>           + arg.substring(1);
>     Nicolas>        try {
>     Nicolas>           System.out.println("setterName "+setterName);
>     Nicolas>           Method setter = parentTag.getClass().getMethod(
>     Nicolas>              setterName, new Class[] { String.class } );
>
>     Nicolas>           setter.invoke(parentTag,
>     Nicolas>              new Object[] {getBodyContent().getString()} );
>
> I believe the functionality in this block is basically what
> "BeanUtils.populate()" does, although with a little more overhead.
>

Your right,
BeanUtils.populate() uses a cleaner PropertyDescriptor interface to get
setter method, but BeanUtils.populate() needs a Map for bean attributes /
values and so is not easy to use for an attribute declaration using JSP Tag
syntax.

To set "arg0" attribute of parent Tag with the value of a bean property, it
would look like :

<parent tag>
    <attr:setAttribute>
        <attr:oneAttribute attr="arg0">
            <bean:write name="" property="" />
        <attr:oneAttribute>
    <attr:setAttribute >
</parent tag>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to