Create a Multi-Selection and Rank tab

The purpose of this post is to help you create a tab where you can (1) choose records among a list and (2) specify the order of the chosen records.

Easy Option

The easiest option is to use iDempiere's built-in multi-selection/chooser feature. Do the following to see an example: To see how this window is created: Here is a list of windows that use the above feature:
select w.name as windowname, t.name as tabname
from ad_tab t
join ad_window w on (t.ad_window_id = w.ad_window_id)
where t.issorttab = 'Y'

Advanced Option

If the above does not satisfy your needs, then you can move to something more advanced. Be aware that the above example is easy to create. The below example is much more difficult and it requires code.