I'm having trouble using nested form attributes with the FORM tags (I know the
HTML tags are replacements, I just wanted to finish my last few pages before
using them.  Unless it fixes this bug, then I'll switch immediately.)

I have traced the code down to the PropertyUtils file.
In the PropertyUtils.setNestedProperty(Object bean, String name, Object value,
boolean convert) method I have the name the value and the bean of the attribute
just fine.  Then the getSimpleProperty(bean,next) returns null for the bean.

Inside getSimpleProperty(Object bean, String name) there is the following
code...
        Method readMethod = descriptor.getReadMethod();
        if (readMethod == null)
            throw new NoSuchMethodException("Property '" + name +
                                            "' has no getter method");

        // Call the property getter and return the value
        Object value = readMethod.invoke(bean, new Object[0]);
        return (value);

The value coming back is null.  Then I get an
java.lang.IllegalArgumentException: Null property value for my value.

1) Why is it getting when it should be setting?
2) Assuming this is wrong and it should be setting... Does it instantiate the
class first or do I have to do that?
(e.g.   OrderInformation shippingOrder = null; is in my Form class.
OrderInformation contains an Address object.  I'm using
shippingOrder.address.address1.  )
String's don't work this way.  Is this a bug or a feature?  I say this because
the attributes on the form are initialized to null and the method was a get... 
Maybe I'm off base... let me know.  
*** Note, the form gets populated just fine when I populate them in the Action
before it goes to the JSP page.  However, when I submit the form it won't store
my updates to the input fields that map to the bean through the nested
parameters because of the error detailed above.


I still have all the debug, I can give further information.
I'm using the nightly source distribution from 01/09/2001.

BTW, I'm really impressed with struts... 
It rocks... Great job everyone... Keep up the good work... Looking forward to
Release 1.0!!!!!!!!!

Thanks in advance, 
Steve

Reply via email to