myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Möller <>
Subject composite components: optional method-expression-attributes
Date Wed, 27 Oct 2010 13:42:25 GMT


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:attribute name="action" method-signature="java.lang.String action()"
default="???" />
  <cc:attribute name="actionListener" method-signature="void
actionListener(javax.faces.event.ActionEvent)" default="???" />

  <tr:commandLink action="#{cc.attrs.action}"
actionListener="#{cc.attrs.actionListener}" />

My problems:
1) omitting the defaults results in NullPointerExceptions
2) the spec says that a default-attribute must evaluate to a

What is the solution for this simple problem?

Thanks in advance.
View this message in context:
Sent from the MyFaces - Users mailing list archive at

View raw message