I have been having troubles with my generated classes from torque and 
finally figured out what was wrong.

All the facts...using the TDK out the box, but get this, using the taglibs 
from struts.  The taglibs "bean" uses an object name and property name to 
look up the object in the specified scope and write out the property 
value.  It uses reflection for this.  However they did reflection, it won't 
work always for overloaded methods.  From my understanding it's a 
limitation of reflection vs. the struts implementation.  That's why I am here.

Here is from the java.sun.com reflection FAQ:
If a class has an overloaded method, does the Method.invoke() method use 
the types of the arguments to select which method will be invoked?
No. Method.invoke() is always invoked on a specific overloading of the 
method, previously selected by a call to Class.getMethod() or by other 
means. The Reflection API does not automatically choose between overloadings.


Reflection (introspection) will not work well if there is method 
overloading in a class.  In torque generated classes, there is 
overloading.    Has anyone had problems with this?  is there a work 
around?  I don't want to customize my torque generated classes!


Example...

     public void setScaleId(String v ) throws Exception
     {
          setScaleId(new NumberKey(v));
     }
      public void setScaleId(NumberKey v ) throws Exception
      {
         ....
         }

Thanks...  I will be able to contribute to others want I am up to speed 
with turbine.




_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

Reply via email to