myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JeroenM <jeroenmeijer8...@hotmail.com>
Subject Re: Can someone help me with createMethodExpression
Date Mon, 06 Jul 2009 08:12:02 GMT

I found out that I had to declare a MethodExpressionActionListener also...
Now the code works :)

@SuppressWarnings("unchecked")
private CoreCommandNavigationItem createTopmenuLink(String linkText) {
   String id = view.createUniqueId();
   CoreCommandNavigationItem navitem = new CoreCommandNavigationItem();
   navitem.setText(linkText);
   navitem.setId(id);

   Class[] args = new Class[] { ActionEvent.class };
   MethodExpression me = expressionFactory.createMethodExpression(
			elContext, "#{menuBean.topmenuClick}", null, args);
   MethodExpressionActionListener listener = new
MethodExpressionActionListener(me);
   navitem.addActionListener(listener);
   return navitem;
}
-- 
View this message in context: http://www.nabble.com/Can-someone-help-me-with-createMethodExpression-tp24350625p24351358.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Mime
View raw message