This project is read-only.

Custom helper to invoke an object's (no-arg) action from the view.


Provide an action extension helper that can invoke a query-only action (either on the target object being viewed or a contributed action) that takes no arguments.

This would be useful for custom "dashboard" views that mashup an object plus the result of a number of actions; eg show a Customer plus the 5 most recent communications.

NB: I am wondering whether the ActionExtensions#ControllerAction does something like this? However, there isn't a type-safe version that I could see, and it also doesn't seem to have much/any documentation on how to use it.

NB2: Scimpi has this feature, so if it isn't implemented, I'm guessing it could be ;-)


RichardPawson wrote Aug 29, 2012 at 9:47 AM

Just for clarification: I assume you mean a helper method that invokes that action and displays the results within the view automatically? (i.e. not a helper method to provide a button/link for the user to invoke that action).

If so, I agree that that would be useful and should be do-able.

dkhaywood wrote Aug 29, 2012 at 10:46 AM

Correct, that is what I mean.

As a slight enhancement, it might also support the automatic invocation of actions that take multiple parameters, and provide a way of hard-coding those arguments.

For example Customer#mostRecentCommunications(int numberOfComms)

could be invoked, providing a hard-coded 5, say, for the numberOfComms.

brentvee wrote Jun 23, 2014 at 8:39 AM

Is this still only a proposed feature?

I'm in need of this.