0

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

Damien Locque
  • 1,810
  • 2
  • 20
  • 42
  • possible duplicate of [How to call a method with a parameter in JSF](http://stackoverflow.com/questions/5273729/how-to-call-a-method-with-a-parameter-in-jsf) – BalusC Mar 02 '12 at 12:21
  • Apart from that your EL version does not support it, you have a syntax error, it has to be `#{search.getSerieByLetter(letterAM)}`, after all. – BalusC Mar 02 '12 at 12:21

1 Answers1

1

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.

Community
  • 1
  • 1
Matt Handy
  • 29,855
  • 2
  • 89
  • 112