This project is read-only.

InformUser message not showing

May 22, 2013 at 5:28 AM
Hi Guys,
          I have a repository method that is acting as a contributed action on the object itself.
But my InformUser message is not showing up when I raise it. Are there any restrictions as to when I can call this method?
public Practitioner GetNextPractitioner(WorkOffer workOffer)
        {
            Practitioner practitioner = null;
            if (workOffer.WorkItem == null)
            {
                Container.InformUser("A work Item must be specified.");
            }
            else
            {
                practitioner = (Practitioner)PractitionerService.GetNextPractitionerByCourt(workOffer.WorkItem.Court);
            }

            return (practitioner);
        }
Regards,
            Alistair
May 22, 2013 at 8:22 AM
If you mean a contributed action (an action that is contributed to an object by a service and appears on the object's actions menu) then there should be no problem with Container.InformUser.

If you mean a finder action (an action that appears in the Find menu alongside a property in edit mode, or an action parameter) then this is a known limitation.

See https://nakedobjects.codeplex.com/workitem/172 and the original discussion this points to.
May 22, 2013 at 10:14 AM
Yes I am calling Container.InformUser in a finder method.
I guess the user can wait to get the error on save for now but it would be nice if you could raise errors from a finder.

Best Regards,
                  Alistair