Problem refreshing UI after document deletion

Hi,

i'm trying to implement a permanent deletion feature : I created a document type that lists the deleted documents for a given user, so that he can permanently delete the selected ones.

Everything runs fine … for the first deletion

It seems that the previsously selected documents are still cached somewhere in the UI (my “permanently delete” button is enabled although selection is empty), so that if i try to delete a second batch of docs, i get a “No such document” error.

I tried to use the Seam.Refresh operation, but it doesn't seem to work.

Any idea ?

0 votes

2 answers

1580 views

ANSWER

quick question, does it work when you click on the refresh button from the UI?
05/03/2012

No, it only refreshes if i get rid of the conversation parameter in the url (eg : &conversationId=0NXMAIN2)
05/03/2012

Can you give us your operation chain you used to implement the permanent deletion ?
05/04/2012

That is simply :

Fetch > UI Selected documents
Document > Delete
User Interface > Refresh

thx

05/04/2012

Same kind of problems with my new "validate button" : i have to refresh the parent container in order to see the effect of my lifecycle transition. I had already met such behaviour with workflows : ended tasks were not visible until logout or a new conversation (link in email).

What's the point of the "Refresh" action since it seems it does not refresh anything ?

05/09/2012



Actually we're missing a 'Clear Selection' operation, a bit like 'Clear Clipboard' works.

The code of your operation would look like that:

@OperationMethod
public void run() {
    OperationHelper.getDocumentListManager().resetWorkingList(
            DocumentsListsManager.CURRENT_DOCUMENT_SELECTION);
}

This will empty the current selection. The refresh UI operation only invalidates queries cache.

1 votes



Thx.

For my second problem ("validate button"), i created a "refresh" automation chain that does what i do in the UI :

Navigate to the Parent document
refresh   
Go back

Seems dirty … but it works.

05/10/2012


the 'Clear Selection' operation works fine : I can select documents after a deletion, nevertheless i still have to refresh the list with my “refresh” automation chain.

0 votes