Container.WarnUser does not work in a Contributed Action

Mar 26, 2013 at 11:51 AM
Hi,

I have an action which accepts an object that is retrieved through a contributed action. The contributed action validates the input and attempts to retrieve the relevant object from the Db via the Container.

If the inputted data is invalid, then the user is notified of this using the Container.WarnUser method.

If the object is null then it uses Container.WarnUser to notify the user that no record was found with the given inputs.

My problem is that in both cases, the message added to the Container is not surfaced to the UI. The only way to surface it is to do this within the Validate method for the contributed action. This is undesirable as I am accessing the Db just to see if the object exists in the Validate method when I should only be doing this in the action itself.

If I access the contributed action from the menu (as opposed to being within an action dialogue) then the message is surfaced as you would expect from Container.WarnUser.

Any ideas on how to resolve this?

Thanks
John
Coordinator
Mar 26, 2013 at 12:42 PM
I think you mean an action invoked from the 'Find' menu rather than a contributed action ?

In which case, yes the finder action just injects its result into the dialog rather than updating the whole page and as such no warning is raised from the finder action. It either finds something or it doesn't.

I'll discuss with Richard when he's back after Easter.
Editor
Mar 26, 2013 at 12:45 PM
In Isis we render such warnings (if there isn't an object to display) using a pop-up. I use JGrowl library, but there are many others, of course.