aspose file tools*
The moose likes Struts and the fly likes Invalid property name? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Invalid property name?" Watch "Invalid property name?" New topic
Author

Invalid property name?

Karl Beowulph
Ranch Hand

Joined: May 31, 2004
Posts: 130
Can someone explain the error Invalid property name to me? I can't seem to find much description as to exactly what triggers it on the web and it's paralyzing a program I'm doing right now.
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

From DynaActionForm:
/**
* Return the property descriptor for the specified property name.
*
* @param name Name of the property for which to retrieve the descriptor
*
* @exception IllegalArgumentException if this is not a valid property
* name for our DynaClass
*/
protected DynaProperty getDynaProperty(String name) {

DynaProperty descriptor = getDynaClass().getDynaProperty(name);
if (descriptor == null) {
throw new IllegalArgumentException
("Invalid property name '" + name + "'");
}
return (descriptor);

}


A good workman is known by his tools.
Karl Beowulph
Ranch Hand

Joined: May 31, 2004
Posts: 130
I should clarify.

I've seen the actual coding of the error, but it still makes little sense to me.

What determines if the name is acceptabla or not?

On my current project, it will take one name, and reject others (they are not key words).
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

It's acceptable for use only if you've declared it.

Maybe there's a property that is being referring to (perhaps in reset()) that isn't a part of the declared form.
Karl Beowulph
Ranch Hand

Joined: May 31, 2004
Posts: 130
This was a DynaBean though, no reset method I'm aware of.

I would get that error with one name, and then, after changing the variable name in the .JSP and config.XML files, it would work.

Is there something I'm overlooking
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Invalid property name?