Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 74438 invoked from network); 13 Oct 2005 11:30:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Oct 2005 11:30:28 -0000 Received: (qmail 21791 invoked by uid 500); 13 Oct 2005 11:30:24 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 21754 invoked by uid 500); 13 Oct 2005 11:30:24 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 21743 invoked by uid 99); 13 Oct 2005 11:30:24 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Oct 2005 04:30:24 -0700 Received-SPF: pass (asf.osuosl.org: local policy) Received: from [217.20.127.43] (HELO nulldevice.org) (217.20.127.43) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Oct 2005 04:30:26 -0700 Received: from [127.0.0.1] (217-20-127-43.internetserviceteam.com [217.20.127.43]) by nulldevice.org (Postfix) with ESMTP id C56BA140ED for ; Thu, 13 Oct 2005 13:30:02 +0200 (CEST) Message-ID: <434E453A.30207@nulldevice.org> Date: Thu, 13 Oct 2005 13:30:02 +0200 From: Marius Kreis User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc3 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: MyFaces Discussion Subject: Re: HtmlCommandLink ActionListener throwing Exception References: <434CC59A.3060300@nulldevice.org> <8f985b960510121018l46fc2639p1a1afa845fa46cd1@mail.gmail.com> In-Reply-To: <8f985b960510121018l46fc2639p1a1afa845fa46cd1@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N i thought i could use the method addActionListener... but setActionListener isn't working either. it seems as if the error is not dependent of the actionListener but thrown if an HtmlOutputLink is clicked itself.... i just described the problem in another mail... Mike Kienenberger wrote: > setActionListener takes a MethodBinding which references an > ActionListener, and not an ActionListener directly. Create a custom > MethodBinding pointing to your PropertyPageListener. > > I think I made an example of doing this as an attachment to > > http://issues.apache.org/jira/browse/MYFACES-331 > > On 10/12/05, Marius Kreis wrote: > >>I'm trying to dynamically building a list of links whereas each of them >>has an ActionListener. >> >>The code is like this: >> >>while(...) { >> HtmlCommandLink link = new HtmlCommandLink(); >> link.setValue("link text"); >> link.addActionListener(new PropertyPageListener()); >> panel.getChildren().add(link); >>} >>(PropertyPageListener is implementing the ActionListener interface) >> >>The code is generating the links but when I click on one of them an >>exception is thrown (see bottom of the mail). >> >>Any idea what's going wrong? >>Is is correct to call the method addActionListener with an anonymous object? >> >>- Marius >> >> >> >> exception >>javax.servlet.ServletException: >>org.apache.myfaces.component.html.ext.HtmlCommandLink >>javax.faces.webapp.FacesServlet.service(FacesServlet.java:109) >>org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122) >> >> root cause >>javax.faces.FacesException: >>org.apache.myfaces.component.html.ext.HtmlCommandLink >>org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421) >>org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.dispatch(JspTilesViewHandlerImpl.java:233) >>org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:219) >>org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:330) >>javax.faces.webapp.FacesServlet.service(FacesServlet.java:95) >>org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122) >> > >