Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6771463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:26:07+00:00 2026-05-26T15:26:07+00:00

This is basically an extension to this answer . I am trying to get

  • 0

This is basically an extension to this answer.

I am trying to get an argument into a method/action call (for a delete button in a list/data table).

Client:

<ui:include src="...">
  <ui:param name="acceptButtonBean" value="#{repoHome}" />
  <ui:param name="acceptButtonAction" value="removeIndividualDocument(#{doc.id})" />
</ui:include>

Sub view:

<h:commandButton value="Continue"
                 action="#{acceptButtonBean[acceptButtonAction]}" />
  ...
</h:commandButton>

However, JSF fails with an exception saying:

...yadda, yadda
02:46:02,431 ERROR [stderr] (http--127.0.0.1-8080-5) Caused by: javax.el.MethodNotFoundException: /subviews/remove-doc-clink-popup.xhtml @37,98 action="#{acceptButtonBean[acceptButtonMethod]}": Method not found: com.company.project.beans.RepoHome@34b183e7.removeExternalDocument(89)()
02:46:02,431 ERROR [stderr] (http--127.0.0.1-8080-5)    at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:109)
02:46:02,431 ERROR [stderr] (http--127.0.0.1-8080-5)    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
02:46:02,431 ERROR [stderr] (http--127.0.0.1-8080-5)    ... 31 more

Note the

....RepoHome@34b183e7.removeExternalDocument(89)()

It can’t work that way. JSF seems to append parentheses no matters what.

Can it be achieved differently, but still with the above technique? If so, how?

If not, why isn’t it working? Is it specified? Is it a bug with Mojarra 2.0.x? I see no problem to omit the parentheses in case of the presence of other parentheses…

Note I’m not looking for alternative solutions like using f:param, f:attribute, or f:setPropertyActionListener.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:26:08+00:00Added an answer on May 26, 2026 at 3:26 pm

    That’s indeed not valid EL. You cannot mix method names and arguments in a single variable. This should work:

    <ui:include src="...">
      <ui:param name="acceptButtonBean" value="#{repoHome}" />
      <ui:param name="acceptButtonAction" value="removeIndividualDocument" />
      <ui:param name="acceptButtonArgument" value="#{doc.id}" />
    </ui:include>
    

    with

    <h:commandButton value="Continue"
        action="#{acceptButtonBean[acceptButtonAction](acceptButtonArgument)}" />
    

    Note that this is not exactly related to JSF, but to EL. If it were a bug or a feature, you’d need to read up the EL specification or report to the EL guys, not the JSF one. JSF is nothing to blame here. EL is an entirely standalone API which JSF just happens to use.


    Update: it turns out that it works on Tomcat 7 (and likely any other container with org.apache.el.* implementation), but not on Glassfish 3 (with com.sun.el.* implementation). It fails as follows while displaying the page:

    Caused by: javax.el.ELException: Error Parsing: #{p1[p2](p3)}
        at com.sun.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:174)
        at com.sun.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:191)
        at com.sun.el.lang.ExpressionBuilder.createMethodExpression(ExpressionBuilder.java:242)
        at com.sun.el.ExpressionFactoryImpl.createMethodExpression(ExpressionFactoryImpl.java:81)
        at org.jboss.weld.util.el.ForwardingExpressionFactory.createMethodExpression(ForwardingExpressionFactory.java:43)
        at org.jboss.weld.el.WeldExpressionFactory.createMethodExpression(WeldExpressionFactory.java:62)
        at com.sun.faces.facelets.tag.TagAttributeImpl.getMethodExpression(TagAttributeImpl.java:222)
        ... 63 more
    Caused by: com.sun.el.parser.ParseException: Encountered "(" at line 1, column 9.
    Was expecting one of:
            (*snip*)
    

    I checked chapter 1.19 of the EL 2.2 spec:

     ValueSuffix      ::= ‘.’ Identifier MethodParameters?
                        | ‘[‘ Expression ‘]’ MethodParameters?          <-- Look here
     MethodParameters ::= '(' (Expression (‘,’ Expression )* )? ')'
    

    and I am pretty confident that Tomcat is right. It’s time to report a bug to Glassfish boys: GLASSFISH-17628.


    Update 2: you seem to be actually using JBoss 7. I don’t know what fork of Tomcat 7 exactly it uses, but I can confirm that I can reproduce your problem with Tomcat 7.0.19; it fails as follows after pressing the button:

    Caused by: javax.el.MethodNotFoundException: /test.xhtml @22,62 action="#{p1[p2](p3)}": Method not found: com.example.Bean@2616aa35.submit(java.lang.String)
        at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:109)
        at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
        ... 24 more
    

    I was using Tomcat 7.0.22 when it ran successfully, so it has been fixed somewhere between Tomcat 7.0.20 and 7.0.22.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a handy extension method to Action to basically run that
Im trying do this basically: var tr = document.createElement(tr); var td = document.createElement(td); td.appendChild(document.createTextNode('<input
I am trying to to build a Felix bundle in Eclipse. This basically includes
This is basically a duplicate of this question , but the accepted answer was
Basically this is a question how to access local scope handler. I trying to
This is basically an extension of Update multiple rows with one query? . I
I wrote this extension that basically changes the look of a website using CSS
I am trying to make a google extension that basically checks the current tab
This maybe extension from the question: Incorporate variables into bash code line I just
I have been trying to search answer for this, but all discussions that I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.