Not sure I follow.
The annotations (or .layout.json) go on the result type.
So, if you have a service/repo action:
public List<Customer> findCustomers(...) { ... }
then you should annotate the Customer class.
It isn't possible to specify different annotations per repo action. If you
want this, you should instead define a view model as a wrapper for the
entity, eg:
public List<CustomerViewModel1> findCustomers( ... ) { ... }
public List<CustomerViewModel2> findCustomersForSomeOtherPurpose( ... )
{ ... }
Try to minimize doing this though; lots of boilerplate to maintain, and it
isn't the Isis "way".
HTH
Dan
On 19 May 2014 13:15, Erik de Hair <[email protected]> wrote:
> I wanted to use the layout.json way because I have a lot of fields to hide
> :-)
>
> How do I match a json-layout with a single repo method?
>
> Erik
>
> On 05/19/2014 01:53 PM, Dan Haywood wrote:
>
> You can use @Hidden(where=Where.STANDALONE_TABLES) or ALL_TABLES or
> PARENTED_TABLES.
>
> Also REFERENCES_PARENT is useful for parented tables, as it automatically
> excludes the reference to a parent.
>
> If you prefer to avoid annotations, use the dynamic layout.json instead.
> This has the advantage of not requiring a restart (if you are not using
> JRebel, that is).
>
> HTH
> Dan
>
>
>
> On 19 May 2014 12:46, Erik de Hair <[email protected]><mailto:[email protected]>
> wrote:
>
>
>
> Hi,
>
> How to manage which fields are displayed in a default list view (result of
> a repo finder method)? I can't find an example...
>
> Thanks,
> Erik
>
>
>
>
>
>
>