Forum Stats

  • 3,875,522 Users
  • 2,266,939 Discussions


Jsf IllegalArgumentException using components

Fabio Olivetto
Fabio Olivetto Member Posts: 1
edited Oct 5, 2016 12:03AM in JavaServer Faces

I am calling this xhtml file

interface>    <cc:attribute name="searchAction"                  default="#{searchController.searchAuthors(compAuthorController.completeAuthorList)}"/></cc:interface><cc:implementation>    <h:form>        <h:outputText id="error" value="#{searchController.errorText}"/><br/>        <h:inputText id="searchText" styleClass="searchBox" size="75"                     value="#{searchController.searchText}"/>        <h:commandButton id="searchButton" value="SEARCH"                         action="#{cc.attrs.searchAction}"/>    </h:form></cc:implementation><cc:

from a template using  <util:search/> : I have the search button an everything but when i try to run it i got "<em><strong><a class="api" href="" target="_new" title="Java API">javax.el.ELException</a>: <a class="api" href="" target="_new" title="Java API">java.lang.IllegalArgumentException</a>: Cannot convert example04_01a of type class <a class="api" href="" target="_new" title="Java API">java.lang.String</a> to class <a class="api" href="" target="_new" title="Java API">javax.el.MethodExpression</a></strong></em>" for sake of this thread the method <em><strong><code class="plain java">searchController.searchAuthors only returns the string "<code class="plain java"><em><strong>example04_01a</strong>" </em>which is the xhtml page i would like to display

public String searchAuthors(List<Author> list){

    return "example04_01a";


This discussion has been closed.