Hi, On Wed, Mar 18, 2015 at 10:46 AM, Erik de Hair <[email protected]> wrote:
> On 03/17/2015 09:16 PM, Martin Grigorov wrote: > >> Hi, >> >> Maybe you can use the Bulk support - select few items in the table, then >> click Up/Down action and depending on the action increase/decrease the >> rank >> of the selected items. >> >> Martin Grigorov >> Freelancer, available for hire! >> Wicket Training and Consulting >> https://twitter.com/mtgrigorov >> >> On Tue, Mar 17, 2015 at 7:17 PM, Erik de Hair <[email protected]> wrote: >> > Hi Martin, > > I thought your idea would be a nice solution but there's one problem when > moving succeeding items down. Each pair of items will switch ranks than but > won't move down. This could be solved by moving items down while beginning > at the bottom of the sorted set, but I don't think I can influence the > order in which the bulk actions are called to the single items, do I? > > I can't expect users to only select 'solitary' items and I think it's not > possible to check for that condition. > > Would it be possible to create a different view for a datatable which > displays the items (implementing some interface with methods like > 'rankUp/Down()') with 2 buttons per row for moving a single item up or > down, by calling rankUp/Down of this item? Everything is possible! The fastest and easiest way (for me!) would be to create a custom component factory that creates a custom component for objects implementing this special/custom interface and renders them as you wish. But this is me thinking as a Wicket developer. Maybe Dan will have a better Isis solution for the problem. > > > Erik > > Hi Oscar, Dan, >>> >>> I think my question wasn't really clear. The ordering in the table is not >>> the problem (I've already implemented the comparable interface based on >>> the >>> mentioned rank-property). >>> >>> I need to arbitrarily change the order of the items by moving an item up >>> or down in the list (this should change the rank values). I was wondering >>> if anybody had an idea or any experience with an elegant way to implement >>> the moving-actions to be executed by the user. >>> >>> Thanks, >>> Erik >>> >>> >>> >>> On 03/17/2015 05:48 PM, Dan Haywood wrote: >>> >>> And also, you can write a custom comparator and reference it using >>>> >>>> @CollectionLayout(sortedBy=MyCustomComparator.class) >>>> >>>> Cheers >>>> Dan >>>> >>>> >>>> >>>> On 17 March 2015 at 16:39, GESCONSULTOR <[email protected]> wrote: >>>> >>>> Hi Erick. >>>> >>>>> Simply by implementing the Comparable interface. >>>>> >>>>> HTH, >>>>> >>>>> Oscar >>>>> >>>>> >>>>> El 17/3/2015, a las 16:43, Erik de Hair <[email protected]> >>>>> escribió: >>>>> >>>>>> Hi, >>>>>> >>>>>> Anybody a great idea for changing item order in a sorted set using the >>>>>> >>>>>> wicket viewer? I have a rank-property in the database but how to >>>>> easily >>>>> manage the item order (move item(s) up/down single or multiple >>>>> places)... >>>>> >>>>> Thanks, >>>>>> Erik >>>>>> >>>>>> >
