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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:31:03+00:00 2026-06-08T18:31:03+00:00

I use a Primefaces carousel component to display a list of items. What i

  • 0

I use a Primefaces carousel component to display a list of items. What i would like to do is show a commandButton on every carousel item which triggers a method on the bean to confirm or decline the entry.

Now it works only for the first entry of the carousel. Clicking on another entry does not invoke the action confirmResource. I guess it has something to do with the IDs but i can’t figure it out.

Here’s the form:

<h:form id="form" prependId="false">
<p:carousel id="resourceCarousel" value="#{resourceRatingBean.resourceProposalList}" var="var" rows="1" itemStyle="width:500px; height: 400px; text-align:center;" circular="true">
    <p:column>

        <h:panelGrid columns="1" cellpadding="3">
            <p:graphicImage value="/cache/images/#{var.imagePath}" width="100"/>
            <h:outputText value="#{var.imagePath}" />
            <h:outputText value="#{var.name}" />
            <h:outputText value="#{var.description}" />
        </h:panelGrid>

        <p:commandButton value="confirm" action="#{resourceRatingBean.confirmResource}" process="@this">
            <f:setPropertyActionListener value="#{var}" target="#{resourceRatingBean.ratedResource}" />
        </p:commandButton>

    </p:column>
</p:carousel>
</h:form>
  • 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-08T18:31:04+00:00Added an answer on June 8, 2026 at 6:31 pm

    I see two likely problems here:

    1. The process="@this" is likely an issue as this will only invoke the process of the invoke the action of the commandButton and not the changes in the carousel component. Try setting this attribute to resourceCarousel or @form instead.

    2. If you are still having issues and using JSF 2 + EL 2.2, then instead of depending on setPropertyActionListener to set the value of a managed property, then instead you can pass the argument var to an actionListener method through an EL expression.

    Here is an example:

    <p:commandButton value="confirm" actionListener="${resourceRatingBean.confirmResourceListener(var)}"
        this="resourceCarousel" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I use id of DataTable Component (Primefaces 2.2.1) inside Composite Component in
I am using PrimeFaces 2.1 to show a dialog like this: <p:dialog header=Test modal=true
I want to use Primefaces to display a wizard pretty much similar to the
I'm trying to make use of the Star Rating component from PrimeFaces. However, it
In our organization, we'd like to use JSF 2.0, Primefaces and Spring Webflow on
Can I use jsf component libraries(primefaces) with spring mvc .I have problem with client
I am working on a simple messenger using JSF and PrimeFaces. I would like
I'm using Primefaces 2.2.1 and JSF 2.0 and I'm trying to show a list
I'm trying to use the primefaces dataExporter to export some data and I have
I use Spring Security 3 and JSF2 Primefaces. Then, I create a index.xhtml for

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.