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
>
>