ISIS-1335: fix documentation of @DomainObject for autocomplete.
Project: http://git-wip-us.apache.org/repos/asf/isis/repo Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/41dfc9f7 Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/41dfc9f7 Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/41dfc9f7 Branch: refs/heads/master Commit: 41dfc9f74ffa6852be35dc027b80089ec605fc4f Parents: aa83770 Author: Dan Haywood <d...@haywood-associates.co.uk> Authored: Thu Jun 23 14:23:32 2016 +0100 Committer: Dan Haywood <d...@haywood-associates.co.uk> Committed: Thu Jun 23 14:23:32 2016 +0100 ---------------------------------------------------------------------- ...ant-DomainObject_autoCompleteRepository.adoc | 28 ++++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/isis/blob/41dfc9f7/adocs/documentation/src/main/asciidoc/guides/_rgant-DomainObject_autoCompleteRepository.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgant-DomainObject_autoCompleteRepository.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgant-DomainObject_autoCompleteRepository.adoc index 97e0182..54d035c 100644 --- a/adocs/documentation/src/main/asciidoc/guides/_rgant-DomainObject_autoCompleteRepository.adoc +++ b/adocs/documentation/src/main/asciidoc/guides/_rgant-DomainObject_autoCompleteRepository.adoc @@ -21,10 +21,10 @@ For example: [source,java] ---- -@AutoComplete( - autoCompleteRepository=Customers.class +@DomainObject( + autoCompleteRepository=CustomerRepository.class ) -public class Customer extends AbstractDomainObject { +public class Customer { .... } ---- @@ -33,14 +33,13 @@ where: [source,java] ---- -public interface Customers { - @Programmatic // <1> - List<Customer> autoComplete(String search); // <2> +@DomainService +public class CustomerRepository { + List<Customer> autoComplete(String search); // <1> ... } ---- -<1> do not expose in the UI -<2> is assumed to be called "autoComplete", and accepts a single string +<1> is assumed to be called "autoComplete", and accepts a single string @@ -53,22 +52,23 @@ For example: [source,java] ---- -@AutoComplete( +@DomainObject( autoCompleteRepository=Customers.class, - autoCompleteAction="findByCustomerName" + autoCompleteAction="findByName" ) -public class Customer extends AbstractDomainObject { +public class Customer { .... } ---- -where in this case `findByCustomerName` might be an existing method already defined: +where in this case `findByName` might be an existing action already defined: [source,java] ---- -public interface Customers { +@DomainService(natureOfService=VIEW_MENU_ONLY) +public class Customers { @Action(semantics=SemanticsOf.SAFE) - List<Customer> findByCustomerName(@ParameterLayout(named="name") String name); + List<Customer> findByName(@ParameterLayout(named="name") String name); ... } ----