0
votes

I'm new in JSF. I'm working on some table with many rows. I want to delete some row:

<h:commandButton action="#{users.deleteSelectedUsers}" onclick="return confirm('Are you sure?')"  value="Delete Users">

After deleting I want to add a new row on top of the table with notification with some info. To which event I can add the function? If I'm putting <f:ajax> between <h:commandButton> the table is not rendered.

1
Haven't you said you're using RichFaces? You can use the oncomplete method to fire javascript actions. The method can be found in <a4j:commandButton> and <a4j:commandLink> tag components (just to mention some).Luiggi Mendoza

1 Answers

0
votes

You should add <f:ajax render="@form"> so that the form with the table will be refreshed...