> > Stupid question: how can ActionLoader invoke method
> > perform() over an Action object, if this method is
> > declared a protected? Shouldn't it be accessible only
> > to class Action and all its descendants?
>
> Exactly. It is. Your class will be a descendant of the Action
> class and therefore you don't have permission problems.
Well, the use case was a little different here: I'm trying to
overload ActionLoader so that you will be able to call
exec(data, "myAction")
which will end up calling perform(data), or
exec(data, "myAction", "doMyMethod")
which will end up calling doMyMethod(data) in class myAction.
> > I realized this when trying to change the invocation
> > to a method passed as a String parameter. When trying
> > to reflect the default method name ("perform"), I
> > get an exception NoSuchMethod.
>
> Keep digging a bit. We may have to make this stuff not be
> protected in order to get what you want.
Ok, this would mean changing the declaration of method
protected void perform(RunData data);
to public... However, the comment for the method says:
"This method is protected to force clients to use
ActionLoader to perform an Action."
Another way of doing this would be to simply call doPerform()
from exec(); this is all perform() does anyway, and doPerform()
is public. Since I'm not familiar with this code, would you
think this is a better approach? What is the purpose of method
perform(), anyway?
> Hmmmmmmm...I also just figured out that VelocityActionEvent.java has a
> method called doEvents() and that will cause problems if
> someone tries to
> make a button named "eventSubmit_doEvents". I will look into
> renaming that method. :-)
This happens with:
doEvents() in ActionEvent, VelocityActionEvent and
WebMacroActionEvent.
doBuildBeforeAction() and doBuildAfterAction() in several
Page-derived classes.
doRedirect() in TemplateScreen.
doOutput() in RawScreen.
doStartTag() and doEndTag() in JSP classes.
Just thought I'd mention it...
> -jon
>
> Honk if you love peace and quiet.
HONK! 8-)
Thanks,
--
Gonzalo A. Diethelm
[EMAIL PROTECTED]
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]