tags:

views:

60

answers:

1

Hello,

I have two bean Code:

 public class ApplContactDtl {
 .......

And Code:

 public class ApplNotifBean extends ApplNotif{
 ...
 private List<ApplContactDtl> contactsList;
 ...

Inside my JSPX I'm displaying the list of ApplContactDtl entries for every entry of ApplNotifBean I would like to add a delete action for these entries (delete the relationship between the beans in the DB). The problem I'm having is that I need to update other stuff for ApplNotifBean after the delete is complete. Ideally I would put the delete action inside ApplContactDtl but I'm not sure how to call the methods of the bean(ApplNotifBean) that refers to the deleted one. If I put the delete action inside ApplNotifBean bean I'm not sure how to assign an ID for the deleted child bean to know how to delete it!

Is there a way to set "deleteBeanID" variable for instance in ApplNotifBean bean to know which one I'm deleting after clicking the button?

Thanks,

Tam

+1  A: 

You have the option to use the action attribute of the commondButton AND the option to use an tag to call another method. in JSF the actionListener method will be called first.

Thats one option, or you could wire in a reference to ApplContactDtl into ApplNotifBean pretty easilly if you are using Spring.

mR_fr0g