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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:06:10+00:00 2026-05-21T03:06:10+00:00

I want to try out building a simple grid that has a delete column,

  • 0

I want to try out building a simple grid that has a delete column, consisting of checkboxes, just like the usual one in email.

User can then tick the checkboxes, and press delete, and i can get all the checked records, and delete them one by one.

Im trying to find a way to achieve this, but so far im still in doubt.

These are what i have in mind, each with it’s own implementation question, haha :

  1. How to get the checked row indexes ? Using actionlistener for each toggle on each checkbox ? (but how do i pass the clicked index to the actionlistener ?)
  2. Or is there a way where i can get all the grid model, and loop the data to find out which one is checked, just like swing ? (but how do i get the grid model in the jsf bean ?)
  3. Or perhaps i should bind them to a simple list that contains only the checkbox column data ? (but how do i bind each checkbox to the list using indexes ?)

Im currently using primefaces, but i think the JSF solution can also be applied to primefaces datatable.

Please share your thoughts on this !

Thank you !

  • 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-21T03:06:11+00:00Added an answer on May 21, 2026 at 3:06 am

    Isn’t this example from Primefaces showcase exactly what you are looking for?

    It looks that it is simply adding a column to the p:dataTable this way:

    <p:dataTable var="item" value="#{yourBean.allElements}"  
                 selection="#{yourBean.selectedElements}">
        <p:column selectionMode="multiple" />
        ... other columns
    </p:dataTable>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to try out a patch on gist that modifies the source code
I want to try out SICP with Python. Can any one point to materials
I try to write a simple Markdown parser in JavaScript. Therefore I want to
I would like to to try Emacs, and want to give it the best
I want to try figure out how to get the <title>A common title</title> <meta
iam developing one application.In that i want to find out the x,y,z axis values
I want to try to convert a string to a Guid, but I don't
I want to try PartCover for code coverage. I'm running Visual Studio 2008 Professional
I have a small project I want to try porting to Python 3 -
I want to give Windows Server 2008 a try as a .NET developer and

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.