• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CF9 - Change sort order for recordset from db (Oracle)

LEGEND ,
Aug 03, 2012 Aug 03, 2012

Copy link to clipboard

Copied

Hello, everyone.

I'm tasked with a project part of which involves using a form to change the sort order of data retrieved from an Oracle (10g production, 11g development) database.  I've never had to do anything like this, before, so I'm at a bit of a loss as to how to go about it.

I've been considering using the jQuery-UI draggable feature, but don't know how to save the data back to the database.

WIth or without the jQuery-UI, what do you think is the best way to go about this?

Respectfully,

^_^

Views

1.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Aug 06, 2012 Aug 06, 2012

A co-worker suggested using the jQuery-UI for the sort, and AJaX to submit the new sort order on every change.

Votes

Translate

Translate
LEGEND ,
Aug 03, 2012 Aug 03, 2012

Copy link to clipboard

Copied

do it in your query.

sort by #form.order_by_field#

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 03, 2012 Aug 03, 2012

Copy link to clipboard

Copied

Sorry.. I didn't describe what I need as well as I thought I had.

Say I have a table for articles that all appear on a page:

ArticleID       Title          Content         SortOrder           Date

1                  Title A       Content A                 3          2012-07-07

2                  Title B       Content B                 1          2012-07-09

3                  Title C       Content C                4          2012-07-17

4                  Title D       Content D                2          2012-07-27

On the page that displays these articles, they appear in order from top to bottom:

Title B

Title D

Title A

Title C

But someone wants to rearrange the order in which they appear.

Title D

Title A

Title C

Title B

I prefer a drag n drop approach, but if that isn't possible/feasible, I'll appreciate suggestions.

Thank you,

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 04, 2012 Aug 04, 2012

Copy link to clipboard

Copied

Put a JQuery table sorter on it.  It's pretty straight fwd.  I don't think you want to bounce back to the server to effect some sorting for the UI, if possible: just do it on the UI.

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 06, 2012 Aug 06, 2012

Copy link to clipboard

Copied

The client wants to be able to save the new sort order to the database.  This is for a very rudimentary CMS to affect the sort order of articles on the publicly viewed pages.

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 06, 2012 Aug 06, 2012

Copy link to clipboard

Copied

LATEST

A co-worker suggested using the jQuery-UI for the sort, and AJaX to submit the new sort order on every change.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation