Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to cancel a save operation?

Is there any way to cancel a save operation from a IWorkingCopyListener? I've added new fields to the workitem overview page using the custom attribute mechanism, along with some error checking on the few fields in my listener that implements IWorkingCopyListener. However, I have some problem in stopping the save operation when the error checking fails. I've attempted to throw an OperationCancelException (which is used when the error checking fails in the "Estimate" field), but this doesn't work in my case because the listener is running asynchronously with the UI thread.

0 votes



One answer

Permanent link
Listeners cannot cancel the operation. You could register an IOperationAdvisor for the "com.ibm.team.workitem.operation.workItemSave" operation in your service plug-in and do the error checking there. This will additionally work for the Web UI.

Christof


aying wrote:
Is there any way to cancel a save operation from a
IWorkingCopyListener? I've added new fields to the workitem overview
page using the custom attribute mechanism, along with some error
checking on the few fields in my listener that implements
IWorkingCopyListener. However, I have some problem in stopping the
save operation when the error checking fails. I've attempted to
throw an OperationCancelException (which is used when the error
checking fails in the "Estimate" field), but this doesn't
work in my case because the listener is running asynchronously with
the UI thread.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,943

Question asked: Jul 17 '07, 5:09 p.m.

Question was seen: 7,150 times

Last updated: Jul 17 '07, 5:09 p.m.

Confirmation Cancel Confirm