You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Dreher, Markus" <M....@dzbw.de> on 2009/11/11 09:33:34 UTC

AW: [jira] Created: (TRINIDAD-1588) NullPointerException using labelAndAccessKey Attribute in XMLMenuModel itemNode Definition

I can provide a patch o this issue, so just let me know how to do this.

Markus

-----Ursprüngliche Nachricht-----
Von: Markus Dreher (JIRA) [mailto:dev@myfaces.apache.org] 
Gesendet: Donnerstag, 8. Oktober 2009 09:32
An: Dreher, Markus
Betreff: [jira] Created: (TRINIDAD-1588) NullPointerException using labelAndAccessKey Attribute in XMLMenuModel itemNode Definition

NullPointerException using labelAndAccessKey Attribute in XMLMenuModel itemNode Definition
------------------------------------------------------------------------------------------

                 Key: TRINIDAD-1588
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1588
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Components
    Affects Versions:  1.2.12-core
            Reporter: Markus Dreher


With Trinidad 1.2.12 i've got the an Exception using the following definition, which worked very well in Version before 1.2.12:

<itemNode id=" administration" immediate="true" 
	labelAndAccessKey="Administration" rendered="true" disabled="true">
</itemNode>

The labelAndAccessKey Value uses no AccessKey Notation (&), which results in the following NullpointerException:
 java.lang.NullPointerException
        at org.apache.myfaces.trinidadinternal.menu.ImmutableItemNode._joinLabelAndAccessKey(ImmutableItemNode.java:569)
        at org.apache.myfaces.trinidadinternal.menu.ImmutableItemNode.getLabelAndAccessKey(ImmutableItemNode.java:522)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
        at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
        at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
        at org.apache.el.parser.AstValue.getValue(AstValue.java:97)
        at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
        at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)

There should be a check for a null accessKey like in ImmutableGroupNode and MenuNode since this is a legal condition.
add before line 522:
      if(accessKey == null) {
        return label;
      }


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Abonnieren Sie unseren Infobrief und erfahren Sie regelmäßig die neuesten Nachrichten über unsere Lösungen, aktuellen Projekte und Entwicklungen. Melden sie sich an mit diesem Link http://www.datenzentrale.de/Info-Brief
_______________________________________________________________________________

Datenzentrale Baden-Württemberg, Anstalt des öffentlichen Rechts
Krailenshaldenstr. 44, 70469 Stuttgart 
Telefon (0711) 8108-0, Telefax (0711) 8108-350
E-Mail info@dzbw.de, Internet www.datenzentrale.de
Vorstand: Karl Tramer (Vors.) und Harald Schätzle, Vorsitzender des Verwaltungsrats: Gunter Czisch
USt-Id-Nr. DE147794223 
_______________________________________________________________________________