Inbox page's contents not refreshed via Browser's refresh

All,

I have a custom inbox. I open a pop up from the custom inbox to see the task details for the selected task. I have a asynch command button to delete the viewed task. The command button calls WmTaskClient service and deletes the task. On Asynch command button, i have added the following java script to the onclick event

CAF.model(‘#{activePageBean.clientIds[“button1”]}’).addActionCompleteListener(
function ()

{

window.close();
window.opener.location.reload();

}
);

My intention is to close the popup and then reload the main page that is the inbox page.

The deletion of the task works, the pop up closes and the inbox page refreshes as expected, but the actual refresh is not happening, I mean the task that was deleted still appears in the inbox. I have also a refresh button where i call the refresh in the action listerner, that works.

My question is, eventhough the inbox page is getting refreshed, why the actual refresh of the inbox is not happening and the task is not getting disappeared?

Any clues? thanks in advance

1 Like

Couple things.

  1. If you have a task CAF application with inbox and task details portlet you don’t need to call a service from IS WmTaskClient package to delete a task, you already have a “delete” action method right on the task client managed bean used in your task details portlet. This would be a much more efficient API call directly into T

  2. Simple reloading on inbox page does not indeed refreshes task list which is stored in the session scoped managed bean TaskSearchContentProvider (the same issue if you delete a task from TLM and then hit F5 in the browser it still going to show you old list) you need to explictely call TaskSearchContentProvider.refresh() action to refresh task list. If you are doing this from the script here is an example:

add a hidden command or async command to your page to invoke refresh() action on the TaskSearchContentProvider. And then use following java script to fire this command:

CAF.model(‘#{activePageBean.clientIds[“”]}’).go();

Alex

Well, here are my comments

About #1:

The reason why i am calling going to IS is: I need to update database about the status of the invoice processing (Approved/Rejected) on clicking the Approve/Reject button. Since i am going to IS for doing such data base update, i am calling the WmTaskclient service as a next step in IS service itself. I completely agree that “Delete” action can be called as an API.

About #2:

Yes, I have done exactly as you said. Thanks for the explanation of session scoped managed bean.

Thanks Alex.