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 8549015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:37:44+00:00 2026-06-11T13:37:44+00:00

I would like to pass the EL one JSF page to Facelets template. Facelets

  • 0

I would like to pass the EL one JSF page to Facelets template. Facelets template just understand EL value as string value. How can I pass EL String to Faceltes Template?

page1.xthml

<ui:include ..../>
<ui:param actionBeanMethod="#{EmployeeActionBean.deleteEmplayee(emp)}>

page2.xthml

<ui:include ..../>
<ui:param actionBeanMethod="#{DepartmentActionBean.deleteDepartment(dep)}>

In comfirmationTemplate.xml

    <a4j:commandLink onclick="#{rich:component('confirmation')}.show();return false">
        <h:graphicImage value="/img/delete.png" />
    </a4j:commandLink>
    <a4j:jsFunction name="submit" action="#{actionBeanMethod}"/>                    
    <rich:popupPanel id="confirmation" width="250" height="150">
       <f:facet name="header">Confirmation</f:facet>
       <h:panelGrid>
          <h:panelGrid columns="2">
             <h:graphicImage value="/img/alert.png" />
         <h:outputText value="Are you sure?" style="FONT-SIZE: large;" />
          </h:panelGrid>
          <h:panelGroup>
             <input type="button" value="OK" onclick="#{rich:component('confirmation')}.hide();submit();return false" />
         <input type="button" value="Cancel" onclick="#{rich:component('confirmation')}.hide();return false" />
          </h:panelGroup>
       </h:panelGrid>
    </rich:popupPanel>

I would like to change action of a4j:jsFuction dynamically.

    When page1.xhtm is call,
    <a4j:jsFunction name="submit" action="#{EmployeeActionBean.deleteEmplayee(emp)"/>

    When page2.xhtm is call,
    <a4j:jsFunction name="submit" action="#{DepartmentActionBean.deleteDepartment(dep)"/>

Can it possible?

  • 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-06-11T13:37:45+00:00Added an answer on June 11, 2026 at 1:37 pm

    You can’t pass method expressions as <ui:param> value. It accepts only value expressions.

    You basically need to create a custom taghandler which re-interprets the value expression as a method expression. From the current open source JSF component/utility libraries, the OmniFaces <o:methodParam> is the only one which does exactly that.

    <o:methodParam name="methodParam" value="#{actionBeanMethod}" />
    <a4j:jsFunction name="submit" action="#{methodParam}" />
    

    You only need to register the Facelets include as a Facelets tag file and use it as

    <my:confirmationTemplate actionBeanMethod="#{EmployeeActionBean.deleteEmplayee(emp)}" />
    

    An alternative is to use a composite component instead.

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

Sidebar

Related Questions

I would like to pass a new value for an integer from one Activity
How does one pass a const char *path to fts_open? I would like to
I would like to store the cookies from one open-uri call and pass them
I would like to pass data from a database column to another page via
I would like to pass a variable from one Controller Action to another and
i have a page called page1.jsf which contains one parameter. i have a command
I would like to pass Bitmap or Drawable from one Activity to another, now
I would like to pass more than one parameter to the partial view. With
I would like to pass a MYSQL query via Coldfusion the following date: 03/13/2010
I would like to pass values into the constructor on the class that implements

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.