commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Young Lee <you...@gmail.com>
Subject setter for export attribute on the jelly:include tag
Date Thu, 23 Jun 2005 21:18:09 GMT
Hi,

My apologies for the wide distribution, but I searched the mail
archives to see if the
following issue have been covered.

I am trying to set the export attribute on the include tag to true as follows

<jelly xmlns="jelly:core>
   ...
  <include uri="..." export="true" />
</jelly>

I set a break point on the only setExport method in the IncludeTag code to see
if this setter is getting invoked.

    public void setExport(String export) {
        if ("true".equals(export)) {
            this.shouldExport = true;
        } else {
            this.shouldExport = false;
        }
    }

It turns out that this method is not getting invoked.  Should there be another
method be added here for the bean introspection to properly invoked the right
setter: namely

    public void setExport(boolean export) { ...

I traced the problem to the following line 876 in the
org.apache.commons.beanutils.BeanUtils.java where the
"descriptor.getWriteMethod()" returned is null

                if (descriptor.getWriteMethod() == null) {
                    if (log.isDebugEnabled()) {
                        log.debug("Skipping read-only property");
                    }
                    return; // Read-only, skip this property setter
                }

I am using the following version of sources from the SVN repository

commons-beautils:  BEANUTIL_1_6 tag
commons-jelly:        HEAD

please let me know if there is a workaround.

Thanx in advance.

- Young

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message