Andrzej Bengner wrote:
Hello

How can I get property method with arguments?
Here is my example code from my TagSupport class:

TagUtils.getInstance().lookup(ipage, iname, "myMethod", iscope);

... and i want to lookup for:
TagUtils.getInstance().lookup(ipage, iname, "myMethod(a,b)", iscope);

lookup() is for looking up a bean (property value), not for looking up a method. The 'property' argument should be the name of a property on the bean specified by the 'name' argument. TagUtils will determine the method to call, call it, and return the resulting object. You can't specify an arbitrary method to call.

You can probably do what you want by changing your code to:

    MyBean bean = TagUtils.getInstance().lookup(ipage, iname, iscope);
    MyThing thing = bean.myMethod(a,b);

L.


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

Reply via email to