[ 
https://issues.apache.org/jira/browse/CAUSEWAY-3815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17894497#comment-17894497
 ] 

Daniel Keir Haywood commented on CAUSEWAY-3815:
-----------------------------------------------

Hi Andi - very nice to see you working on this, as it's something we've been 
thinking about also.

Have you thought about how to identify which actions should be available, and 
in which order?

Probably for consistency there should be the ability to specify using 
`@ActionLayout`, but I was also thinking it might be useful to support using a 
file similar to the `columnOrder.txt` file.

As a reminder, if I have a Customer with an "orders" collection, today I can 
create a file:

Customer#orders.columnOrder.txt

and that file lists which properties of Order should be shown as columns, and 
their sequence.

So I was thinking that we could have

Customer#orders.actionOrder.txt

which would list which actions of Order should be shown in the "orders" 
collection.

With columnOrders, we also have a fallback (aside: though it might have a bug 
in it, separate issue).  At any rate:

Order.columnOrder.txt

is meant to be used as the fallback list of Order's properties to be used in 
every collection of Orders, if not overridden by a more specific file (as per 
above).

So, by analogy, for action orders, we would have:

Orders.actionOrder.txt

that defines the order of actions by default within collections, unless 
overridden.

 

Perhaps "actionOrder" isn't quite descriptive; maybe "popupActionOrder" or 
"actionOrderFromCollection" ... but it should be a bit shorter than that.

 

 

> [Wicket Viewer] Support for Actions in Collection View
> ------------------------------------------------------
>
>                 Key: CAUSEWAY-3815
>                 URL: https://issues.apache.org/jira/browse/CAUSEWAY-3815
>             Project: Causeway
>          Issue Type: New Feature
>          Components: Viewer Wicket
>            Reporter: Andi Huber
>            Assignee: Andi Huber
>            Priority: Minor
>             Fix For: 3.3.0, 2.3.0
>
>
> The programming model is already sufficient to cover this use-case:
> If an action is NOT hiddenWhere in tables, then show it in tables.
> +Design Proposal:+
> The last column in tables named `Actions` shall be dedicated to actions.
> Scenarios within a single table cell:
>  * If only a single action is shown, then render it as a button.
>  * If less than configurable threshold of actions is shown, render them as 
> buttons in a vertical layout (because, that aligns with how we allow for cell 
> to render plurals/collections)
>  * If more than configurable threshold of actions is shown, then collect them 
> into a dropdown menu (with ellipsis). ... perhaps could however render a 
> primary action as button still
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to