On 10 January 2014 09:53, Chohan, Dharmesh <[email protected]> wrote:
> Hi
>
> As I understand actions are presentenced via the top level menu options.
Yes.
To be a little more precise, the actions of the registered domain services
(in isis.properties) are shown as items of the top level menu.
The actions of the entity are shown as buttons either to the right of its
icon/title, or near to the property/collection with which the action is
associated. This can be done either using @MemberOrder annotation, or
using JSON, see [1, 2].
> I want to call a DomainX action from a button "OK" which is generated by
> the framework. In my case I have DomainA action calling DomainB. You do
> something in DomainB screen, edit and then press the "OK" button.
>
> How can map the "OK" button to some other DomainX action. Is this
> possible?
>
>
I'm not quite sure what this "OK" button is, do you mean an action called
ok() on DomainA?
If so, then to answer your question, then it is not possible to map the
button to some other domain object; that would violate the layering of
responsibilities that Isis enforces. Instead, have your domain object A
call domain object B:
public class DomainObjectA {
public void ok() {
DomainObjectB b = .... /// get hold of
b.doSomething();
}
}
But perhaps I've misunderstood what you wanted.
~~~
Isis also supports the notion of contributed members (properties,
collections, actions). This might also support your use-case (and is a very
powerful technique, somewhat akin to using traits). There's some
information about it at [3]
HTH
Dan
[1] https://isis.apache.org/core/dynamic-layouts.html
[2]
https://github.com/apache/isis/blob/master/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItem.layout.json
[3]
http://isis.apache.org/applib-guide/how-tos/how-to-01-062-How-to-decouple-dependencies-using-contributions.html
> Thanks
> Dharmesh
>
>
>
>
>
>