Opened 10 years ago

Closed 10 years ago

#597 closed enhancement (fixed)

Allow manual ordering of references in a VC

Reported by: Twan Goosen Owned by:
Priority: major Milestone: VirtualCollectionRegistry-1.0
Component: VCRegistry Version:
Keywords: Cc:

Description

Explicitly store the order of VC references (resources) and allow the user to modify this order (by drag and drop?).

Find a good way of representing this in the data model. http://stackoverflow.com/questions/9536262/best-representation-of-an-ordered-list-in-a-database might have some suggestions (although usage of JPA makes things different).

Change History (4)

comment:1 Changed 10 years ago by Twan Goosen

Drag and drop might be a bit tricky to implement with the provided version of Wicket. An alternative paradigm that is easier to implement and seems nearly as user friendly is 'click to move', requiring one click to indicate the item to move and another click to determine the target. Another advantage is that this will work better with paginated results.

comment:2 in reply to:  description ; Changed 10 years ago by Twan Goosen

Replying to twan.goosen@…:

Find a good way of representing this in the data model. http://stackoverflow.com/questions/9536262/best-representation-of-an-ordered-list-in-a-database might have some suggestions (although usage of JPA makes things different).

JPA 2 has the @OrderColumn annotation.

comment:3 in reply to:  2 Changed 10 years ago by Twan Goosen

Replying to twan.goosen@…:

JPA 2 has the @OrderColumn annotation.

This works nicely, except that DDL (auto schema generation/updating) fills in null or 0 (in case null is disallowed) for 'resource_ORDER' for all resources, which limits all collections to a single result.
Some method is needed that inserts correct indices for all resources for all collections without gaps. This only needs to happen once to preserve existing collections.

comment:4 Changed 10 years ago by Twan Goosen

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.