Title: Nachricht
If the code you are using is as you show it in the message, then appear to have a syntax error in:

 <c:forEach var="forEachColumn"
      varStatus="forEachStatus"
         items="#dynamicTable.rowLayout.spalten}" >
You appear to be missing a leading brace and it should probably be:

 <c:forEach var="forEachColumn"
      varStatus="forEachStatus"
         items="#{dynamicTable.rowLayout.spalten}" >

                     -=> Gregg <=-

Kuhn, Harald wrote:
Hi to all,
 
are there any ideas regarding this issue?
 
Best regards
 
  Harald Kuhn
 

Lufthansa AirPlus Servicekarten GmbH · Hans-Böckler-Straße 7 · 63263 Neu-Isenburg · Germany · Geschäftsführer: Patrick W. Diemer (Vorsitz), Lutz Logemann · Vorsitzender des Aufsichtsrates: Stephan Gemkow · Handelsregister: Amtsgericht Offenbach/Main, HRB 8119

-----Original Message-----
From: Kuhn, Harald [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 17, 2007 9:07 AM
To: [email protected]
Subject: Problem mixing c:forEach and Trinidad tr:table and tr:column

Hi to all,

I' ve some problems while trying to build a table dynamically.
We have some meta-objects (named RowLayout) that describe,

  • which columns will be displayed
  • which heading is used
  • is the column sortable and what is the name of the sortProperty.

This approach works fine, as far as I use the EL-expressions "forEachColumn" and "forEachStatus" within the body of a tr:column tag.

But, if I try to set the attribute sortProperty with an EL-_expression_ I get a ClassNotFoundException.
As far as I could see, the mentioned class is present in facelets.jar.

Here is the code snippet from my Facelet:
<!-- OK
            <tr:column   sortable="true"
                     sortProperty="kategorie">

    NOT OK:
            <tr:column   sortable="true"
                      sortProperty="#{forEachColumn.spalte}">

java.lang.ClassNotFoundException: com.sun.facelets.tag.jstl.core.IndexedValueExpression
org.apache.myfaces.trinidadinternal.application.StateManagerImpl restoreView
SEVERE: No structure available and no root available
org.apache.myfaces.trinidadinternal.config.xmlHttp.XmlHttpConfigurator handleError
SEVERE: Server Exception during PPR, #19
java.lang.NullPointerException
-->
<tr:table value="#{dynamicTable.data}"
            var="tableRow"
      varStatus="tableStatus"
     rowBandingInterval="1"
           rows="5"
         noWrap="true"
       sortable="true">
 <c:forEach var="forEachColumn"
      varStatus="forEachStatus"
         items="#dynamicTable.rowLayout.spalten}" >
    <tr:column   sortable="true"
                   noWrap="true"
             sortProperty="kategorie"
         defaultSortOrder="ascending">
      <f:facet name="header">
         #{forEachColumn.ueberschrift.header} <br />
      </f:facet>
      #{tableRow[forEachColumn.spalte]}
    </tr:column>
  </c:forEach>
</tr:table>

Everything works fine, if sortProperty is a literal (and no EL-_expression_).
With an EL-_expression_ instead, I get an ClassNotFoundException followed by a NullPointerException.

Our environment is:
myFaces         1.2.1-SNAPSHOT
trinidad                1.2.2
facelets                1.1.13

My question now is:
Why can I use EL-_expression_ within the body of tr:column, but not to set an attribute of tr:column?

Thanks for your help.

Harald Kuhn


Lufthansa AirPlus Servicekarten GmbH · Hans-Böckler-Straße 7 · 63263 Neu-Isenburg · Germany · Geschäftsführer: Patrick W. Diemer (Vorsitz), Lutz Logemann · Vorsitzender des Aufsichtsrates: Stephan Gemkow · Handelsregister: Amtsgericht Offenbach/Main, HRB 8119


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to