Hi,
the problem lies in org.apache.myfaces.trinidadinternal.menu.ItemNode. Each
item from your menu-metadata.xml is handled by this class. Unfortunately the
current implementation does not have an action method that would call your
action listener. In other words: IMO it seems to be a bug/missing feature in
Trinidad.
Regards,
Sven
_______________________________
Think before you print
CONFIDENTIALITY: This e-mail (including any attachments) may contain
confidential, proprietary and privileged information, and unauthorized
disclosure or use is prohibited. If you receive this e-mail in error, please
notify the sender and delete this e-mail from your system.
SunGard CARNOT GmbH * Registered: Frankfurt am Main, Handelsregister Frankfurt
HRB 79504 * Geschäftsführer: Harold Finders, Dr. Marc Gille, Dr. Dirk Lüth,
Michael J. Ruane, Victoria Elizabeth Silbey
________________________________
Von: Boyle, PJ [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 18. März 2008 16:20
Cc: [email protected]
Betreff: How to invoke ActionListener for menuitem in XMLMenuModel?
Hi,
I am trying to get an ActionListener invoked when a menuitem defined in
an XMLMenuModel is clicked, I have defined a class
that implements the ActionListener interface as follows:
public class UserMenuSelectActionListener
{
public void processAction(ActionEvent actionEvent)
throws AbortProcessingException
{
// the component that triggered the action event
UIComponent component = actionEvent.getComponent();
System.out.println("The id of the component that fired the
action event: " + component.getId());
}
}
I have an itemnode defined in a menu-metadata.xml as follows:
<itemNode id="reports" label="#{res.sso_username}"
action="UserSearchOutcome" focusViewId=""
actionListener="#{'user_menu_select_actionlistener.processAction'}">
I have a backing bean defined in faces-config.xml for
user_menu_select_actionlistener:
<managed-bean>
<managed-bean-name>user_menu_select_actionlistener</managed-bean-name>
<managed-bean-class>ie.gov.agriculture.sso.trinidad.UserMenuSelectActionListener</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
</managed-bean>
And finally I have the page where the menu is defined:
<tr:navigationPane binding="#{backing_index.navigationPane1}"
id="navigationPane1" hint="tabs"
var="foo" value="#{root_menu}"
level="1">
<f:facet name="nodeStamp">
<tr:commandNavigationItem text="#{foo.label}" action="#{foo.doAction}"
actionListener="#{foo.actionListener }"/>
</f:facet>
</tr:navigationPane>
When I try to run this I get the following:
"javax.faces.el.MethodNotFoundException: processAction:
java.lang.String.processAction(javax.faces.event.ActionEvent)"
Does anybody have any tips on where the problem is please?
Pj.
________________________________
Department of Agriculture, Fisheries and Food
The information contained in this email and in any attachments is
confidential and is designated solely for the attention and use of the intended
recipient(s). This information may be subject to legal and professional
privilege. If you are not an intended recipient of this email, you must not
use, disclose, copy, distribute or retain this message or any part of it. If
you have received this email in error, please notify the sender immediately and
delete all copies of this email from your computer system(s).
An Roinn Talmhaíochta, Iascaigh agus Bia
Tá an t-eolais san ríomhphost seo, agus in aon ceangláin leis, faoi
phribhléid agus faoi rún agus le h-aghaigh an seolaí amháin. D'fhéadfadh ábhar
an seoladh seo bheith faoi phribhléid profisiúnta nó dlíthiúil. Mura tusa an
seolaí a bhí beartaithe leis an ríomhphost seo a fháil, tá cosc air, nó aon
chuid de, a úsáid, a chóipeál, nó a scaoileadh. Má tháinig sé chugat de bharr
dearmad, téigh i dteagmháil leis an seoltóir agus scrios an t-ábhar ó do
ríomhaire le do thoil.