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

  • Home
  • SEARCH
  • 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 6574429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:15:38+00:00 2026-05-25T15:15:38+00:00

I have a dataTable with a column named DELETE (it is a link) which

  • 0

I have a dataTable with a column named DELETE (it is a link) which has an listener . When I click it the first time (click 1) it deletes the row (as expected), but when I try it with another row after that nothing happened (click 2). In fact wherever I click next nothing happen. I should click another time (click 3) to get it work. I don’t want that.

Attention: The “delete()” method in my_user is not reached after “click 2”.

Here is the code for the column:

<h:column>
    <f:facet name="header">#{lng.del}</f:facet>
    <h:form>
        <h:commandLink action="#">
            <f:ajax event="click" listener="#{my_user.delete}" render="@all" />
            <h:graphicImage name="delete.png" library="images" styleClass="tableIcon" />
        </h:commandLink>
    </h:form>
</h:column> 
  • 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-25T15:15:38+00:00Added an answer on May 25, 2026 at 3:15 pm

    You’ve multiple forms inside the table. When you re-render another form from inside a form by ajax, then its view state will get lost and hence the 1st click will fail. This click however takes care that the form gets the view state back, so the 2nd click works.

    Technically you need to re-render only the content of the other form, but this isn’t possible in this particular use case. Better put the <h:form> outside the <h:dataTable> so that you have a single form with a shared view state.

    <h:form>
        <h:dataTable>
            ...
        </h:dataTable>
    </h:form>
    

    If your page contains another forms as well, I’d suggest to render only the current form instead of all, otherwise any actions on those forms will fail as well.

    <f:ajax event="click" listener="#{my_user.delete}" render="@form" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a datatable which loops through a List and has a value column
I have a DataTable that has a boolean column called [Invalid]. I need to
I have a datatable that has a date column, but I am stumped as
How to filter DataView/DataTable by time? I have a table with datetime column inside
I have a DataTable with column Value and column Name that has 30000 rows.
I need to iterate through a DataTable . I have a column there named
I have a DataTable with an Id column, which is an identity column in
I need to update/replace the data in datatable.column. The table has a field named
I have rich datatable with delete button: When I delete the row, row is
I'm binding ListView control to DataTable. The DataTable have a column named ProductID. Is

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.