While trying to find a reference to what I wrote about, I came across this posting.
There's a number of ideas kicked back and forth there, and the one on using <f:attribute> for your action and actionListener might work for you. http://www.icefaces.org/JForum/posts/list/8006.page On Wed, Oct 27, 2010 at 3:31 PM, Mike Kienenberger <mkien...@gmail.com> wrote: > I seem to vaguely recall from the facelets mailing lists long ago that > you had to sometimes pass method bindings as two separate parameters. > One for the object, and one for the method name. > > "#{object}.#{method}" > > Sorry I can't be of more help, but maybe it'll get you going in the > right direction. > > > > On Wed, Oct 27, 2010 at 9:42 AM, Thomas Möller > <thomas.moel...@continentale.de> wrote: >> >> Hi, >> >> what is the recommended way how to deal with optional attributes that refer >> to a method expression? >> >> For example imagine a simple component that uses a commandLink and has two >> attributes: "action" and "actionListener": >> >> <cc:interface> >> <cc:attribute name="action" method-signature="java.lang.String action()" >> default="???" /> >> <cc:attribute name="actionListener" method-signature="void >> actionListener(javax.faces.event.ActionEvent)" default="???" /> >> </cc:interface> >> >> <cc:implementation> >> <tr:commandLink action="#{cc.attrs.action}" >> actionListener="#{cc.attrs.actionListener}" /> >> </cc:implementation> >> >> My problems: >> 1) omitting the defaults results in NullPointerExceptions >> 2) the spec says that a default-attribute must evaluate to a >> java.lang.String >> >> What is the solution for this simple problem? >> >> Thanks in advance. >> -- >> View this message in context: >> http://old.nabble.com/composite-components%3A-optional-method-expression-attributes-tp30067392p30067392.html >> Sent from the MyFaces - Users mailing list archive at Nabble.com. >> >> >