DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21507>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21507

Mapped properties do not work in certain situations ....

           Summary: Mapped properties do not work in certain situations ....
           Product: Struts
           Version: 1.1 Final
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Custom Tags
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Mapped properties do not work in certain situations ....

public class TestBean
{
   public TestBean()
   {
   }
   public Object getAttributeValue(int attributeIndex)
   {
      return "Find attributeValue by attributeIndex";
   }
   public Object getAttributeValue(String attributeName)
   {
      return "Find attributeValue by attributeName";
   }
}

Assume TestBean is accessible in the request scope by property testBean.

now using tag
<bean:write name="testBean" property="attributeValue(countryCode)"/>
throws exception
No getter method for property attributeValue(countryCode)
this is because there exist another method with the same name but with 
different type of argument:
public Object getAttributeValue(int attributeIndex)
if we rename this method to: 
public Object getAttributeValueX(int attributeIndex)
everything is OK.

I assume that this is a bug and that the code searching for the method
only serching by name without checking the argument type to the method.

The code search for method with name getAttributeValue
and find method
public Object getAttributeValue(int attributeIndex)

Regards 
Einar Haave

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

Reply via email to