Hi,
Maybe this is more related on how reflection works, But I'm trying to understand the 
behavior here...
Here's my situation:

I have a Bean under request scope with the following methods:

public MyBean {
        private java.util.Calendar startDate;
                
        public void setStartDate(Calendar newValue) {
                this.startDate = newValue;
        }
        public void setStartDate(java.util.Date newValue) {
                if (this.startDate == null) {
                        this.startDate = Calendar.getInstance();
                }
                this.startDate.setTime(newValue);
        }
        public Calendar getStartDate() {
                return this.startDate;
        }
}
Well, forget all the typos, since I just created the above code as example... But when 
I have a scenario like the above (two setters with different signature - can be 
Calendars, int and Integer, long and Long, etc...)
the above tags, <bean:write> and <bean:define> complains that can't find a getter 
method for property ???.

I tried with <jsp:useBean> and <jsp:getProperty> and the error was: "Property ??? in 
<package.class> is write only"

Am I missing something? I don't know much about reflection, but I know that it's 
possible to declare the method signature while trying to get reference to a method, 
and it seems that it's not the case here...

Any explanation is appreciated...

Right now, I just fixed the problem by removing one of the setter methods.

Regards,
Marcelo
        

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

Reply via email to