I took this root for now.

I created a hidden input field called j_action_key.
Upon change of the select box event , onchange, I set the value of
field  j_action_key to "do[Action]".
For example, I have region select box, so I set j_action_key value to
"doRegion".
Once I'm back in my portlet action class method, buildConfigContext
in this case, I use reflection to invoke the method event specified
by the j_action_key field. (in the above case doRegion)
So now I create a method "public void doRegion(Rundata data, Context
context)" that will do what it needs to upon the onchange
="javascript:fireJAction('doRegion');" invocation. (Note fireJAction
javascript function changes the value of  j_action_key field and
submits the form, of course ;))
I pass my RunData and Context objects onto my event that I'm
invoking.

Anyway, not to neat either but it does the job.


One newbie question...

Is there a way to dispatch your actions so that they don't live in
one class. I'm afraid that my action portlet will get way to
cluttered if they all reside in my class?
Maybe something like:

void actionPerformed(event) {
  EventDispatcher.doAction(event);
}


--Alen



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

Reply via email to