Damien Locque
Damien Locque

Reputation: 1809

JSF DataTable with value "Function parameter"

i don't know if its just possible but i want to create a DataTable with a value based on the value of another dataTable parent

Here the actual code (he don't work) :

<h:form id="searchTableAM">
           <x:dataTable id="lettersAM"
                         value="#{searchBO.listAM}"
                         var="letterAM">
                <x:column>
                    <x:div>
                        <x:outputText value="#{letterAM}"/>                            
                    </x:div>
                    <x:dataTable id="resAMID"
                                 value="#{search.serieByLetter(letterAM)}"
                                 var="resAM">
                            <h:column>
                                <x:outputText value="#{resAM.title}"/>     
                            </h:column>
                    </x:dataTable>
                </x:column>
            </x:dataTable>            
        </h:form>

The probleme is the value of the second dataTable (function with a parameter) here the prototype :

public List getSerieByLetter(String letter)

ps : 1st dataTable alone work

here the result :

org.apache.commons.el.parser.ParseException: Encountered "(" at line 1, column 28.

Was expecting one of "}" ...

if anyone know how to fix it , or know a similar exemple code :) you're welcome

Upvotes: 0

Views: 1171

Answers (1)

Matt Handy
Matt Handy

Reputation: 30025

It seems that your EL version doesn' support method invokation. This was introduced with Expression Language version 2.2. See this answer to a related question for more information.

Upvotes: 1

Related Questions