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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:36:54+00:00 2026-05-26T04:36:54+00:00

I have the page below, everything works fine… Except that after I click the

  • 0

I have the page below, everything works fine…

Except that after I click the delete button and hit “Yes Sure” in the Confirm Dialog My page doesn’t change… It should show me the same form without that user.

I tryed a lot of things, but I am using Primefaces 3.0.M3
My form table is server created so it should be ajax usable.

Anyone got an idea what is wrong ?

Thanks !

                <h:form id="main" prependId="false">
                    <p:dataTable var="user" value="#{userController.allUsers}" id="userTable">                                
                     <p:ajax event="rowEdit" update="@this" listener="#{userController.onEditRow}" />                     

                        <f:facet name="header">
                            #{bundle.ListOfUsers}
                        </f:facet>  

                        <p:column headerText="#{bundle.USERNAME}" style="width:110px">  
                            <p:cellEditor>  
                                <f:facet name="output">  
                                    <h:outputText value="#{user.name}" />  
                                </f:facet>  
                                <f:facet name="input"> 
                                        <p:inputText value="#{user.name}" style="width:110%"/>  
                                </f:facet>  
                            </p:cellEditor>  
                        </p:column>  


                        <p:column headerText="#{bundle.Login}" style="width:100px">  
                            <p:cellEditor>  
                                <f:facet name="output">  
                                    <h:outputText value="#{user.login}" />  
                                </f:facet>  
                                <f:facet name="input">
                                     <h:outputText value="#{user.login}" />  
                                </f:facet>  
                            </p:cellEditor>  
                        </p:column>  

                        <p:column headerText="#{bundle.Roles}" style="width:180px;">
                            <p:cellEditor>  
                                <f:facet name="output">  
                                    <h:outputText value="#{user.rolesCollection}"/>                                    
                                </f:facet>  
                                <f:facet name="input">
                                            <p:selectManyMenu  value="#{user.rolesCollection}"                                                        
                                                                               converter="rolesConverter"
                                                                               style=" width:100%;">
                                                    <f:selectItems value="#{roleController.listOfRoles}"                                                 
                                                            var="roles"   
                                                            itemLabel="#{roles.rolename}"  
                                                            itemValue="#{roles}" 
                                                    />  
                                            </p:selectManyMenu>
                                </f:facet>  
                            </p:cellEditor>  
                        </p:column>  

                        <p:column headerText="#{bundle.edit}" style="width:10px; overflow:visible;">  
                            <p:rowEditor/>                            
                        </p:column>
                        <p:column headerText="#{bundle.delete}" style="width:10px; overflow:visible;">                              

                            <p:commandButton update=":main" oncomplete="confirmation.show()" image="ui-icon ui-icon-close" title="Delete" >  
                                <f:param value="#{user.id}" name="userAction" />
                            </p:commandButton>  

                        </p:column>

                    </p:dataTable>

                    <p:confirmDialog message="Are you sure? user:#{param['userAction']} " width="500"  
                        header="Confirm" severity="alert" widgetVar="confirmation" >                        
                        <p:commandButton value="Yes sure" update="userTable" actionListener="#{userController.deleteAction( param['userAction'])}" oncomplete="confirmation.hide()" >
                            <f:param name="userAction" value="#{param['userAction']}" />
                        </p:commandButton>
                        <p:commandButton value="Not yet" onclick="confirmation.hide()" type="button" />                        
                    </p:confirmDialog>                   
                </h:form> 

Here is the controller method

public void deleteAction(String id){

    userFacade.remove(userFacade.find(Integer.parseInt(id)));

} 

This method is being called and it’s deleting the user.

  • 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-26T04:36:55+00:00Added an answer on May 26, 2026 at 4:36 am

    You need to reload the allUsers list in the bean’s action method after deleting the user.

    public void deleteAction(String userId) {
        userService.delete(Long.valueOf(userId));
        allUsers = userService.list();
    }
    

    Otherwise JSF will just retrieve the original list. You’re apparently prepopulating the list in the (post)constructor of a view scoped bean, that’s why a F5 works.

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

Sidebar

Related Questions

i have rotating image in my webpage. link is below: http://equosinfotech.com/testdemo/test.html everything works fine
I have a page (below) that has a datagrid that lists item's returned from
in my application i have the playvideo page where video will play, below that
I have a page like below; <style type=text/css> #test a{ display: block; width: 150px;
I have a page like below; <style type=text/css> #div1 { height: 100px; background-color: #CCCCCC;
I have added placeholder to a page as below. <tr > <td > <asp:PlaceHolder
I have a page with 5 buttons on top. I want the area below
I have uploaded a page with the code below to my joomla root directory.
I have a search page with the following scenarios listed below. I was told
If I have Checkboxes in page with IDs like below a_chk1, a_chk2, a_chk3, b_chk1,

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.