Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

Jsf IllegalArgumentException using components

Fabio OlivettoOct 4 2016 — edited Oct 5 2016

I am calling this xhtml file

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

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

public String searchAuthors(List<Author> list){

    return "example04_01a";

}

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 1 2016
Added on Oct 4 2016
0 comments
294 views