Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Sorting on tree table with modified rows [JDeveloper 11.1.1.6.0]

anirbmuk-OracleMay 9 2014

I have a tree table with 3 levels of hierarchy. The 3 levels come from 3 different view objects based on a single entity object. All 3 view objects are ordered by the same column ALT_SEQ_NBR. This value is unique and comes from a sequence and is not a primary key.

The requirement is to have the ability to move each record within their respective levels move up or down by swapping their ALT_SEQ_NBR values and reordering them.

When I try to sort the unmodified tree table with SortCriterion, it works well. However, when I swap the ALT_SEQ_NBR values or add a new row to the tree, the new or modified rows do not take part in the sorting process, they stay in their respective positions.

The first level always gets sorted. The problem occurs with the child levels. If I commit my changes (after editing or inserting a new child row), then the child elements move up or down as per the sorting logic. However, I am not allowed to commit immediately after making any change to the tree table.

The sorting logic for new/modified rows works with a normal table if I use

setQueryMode(ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES | ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);

I also have the child level tree bindings on the page and I have tried to apply the setQueryMode to the individual view objects and re-query them. But while all the unmodified siblings at level 2 or level 3 move up or down, the swapped ones don't.

Let me know if any one has any idea.

Thank you,

Anirban Mukherjee

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 6 2014
Added on May 9 2014
0 comments
112 views