Index: openacs-4/packages/xowiki/xowiki.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/xowiki.info,v
diff -u -r1.180.2.90 -r1.180.2.91
--- openacs-4/packages/xowiki/xowiki.info	23 Mar 2022 09:03:40 -0000	1.180.2.90
+++ openacs-4/packages/xowiki/xowiki.info	23 Mar 2022 20:37:16 -0000	1.180.2.91
@@ -10,7 +10,7 @@
     <inherit-templates-p>t</inherit-templates-p>
     <auto-mount>xowiki</auto-mount>
 
-    <version name="5.10.1d21" url="http://openacs.org/repository/download/apm/xowiki-5.10.1d21.apm">
+    <version name="5.10.1d22" url="http://openacs.org/repository/download/apm/xowiki-5.10.1d22.apm">
 	<owner url="mailto:neumann@wu-wien.ac.at">Gustaf Neumann</owner>
 	<summary>A xotcl-based enterprise wiki system with multiple object types</summary>
 	<release-date>2021-09-15</release-date>
@@ -55,8 +55,8 @@
 	<license>BSD-Style</license>
 	<maturity>2</maturity>
 
-	<provides url="xowiki" version="5.10.1d21"/>
-	<requires url="xotcl-core" version="5.10.1d5"/>
+	<provides url="xowiki" version="5.10.1d22"/>
+	<requires url="xotcl-core" version="5.10.1d6"/>
 	<requires url="acs-datetime" version="5.9.1"/>
 	<requires url="acs-kernel" version="5.10.0"/>
 	<requires url="acs-tcl" version="5.10.1d12"/>
Index: openacs-4/packages/xowiki/tcl/includelet-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/includelet-procs.tcl,v
diff -u -r1.239.2.85 -r1.239.2.86
--- openacs-4/packages/xowiki/tcl/includelet-procs.tcl	7 Mar 2022 19:00:24 -0000	1.239.2.85
+++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl	23 Mar 2022 20:37:16 -0000	1.239.2.86
@@ -2373,7 +2373,6 @@
             $extra_where_clause $locale_clause"]
     set pages [::xowiki::Page instantiate_objects -sql $sql]
 
-    $pages mixin add ::xo::OrderedComposite::IndexCompare
     if {$range ne "" && $page_order_att ne ""} {
       lassign [split $range -] from to
       foreach p [$pages children] {
@@ -2386,6 +2385,7 @@
 
     $pages orderby \
         -order [expr {$order_direction in {asc ""} ? "increasing" : "decreasing"}] \
+        -type [ad_decode $order_attribute page_order index dictionary] \
         $order_attribute
 
     if {$source ne ""} {
Index: openacs-4/packages/xowiki/tcl/table-widget-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/table-widget-procs.tcl,v
diff -u -r1.1.2.16 -r1.1.2.17
--- openacs-4/packages/xowiki/tcl/table-widget-procs.tcl	5 Jan 2022 19:17:50 -0000	1.1.2.16
+++ openacs-4/packages/xowiki/tcl/table-widget-procs.tcl	23 Mar 2022 20:37:16 -0000	1.1.2.17
@@ -19,6 +19,7 @@
     {-bulk_actions ""}
     {-renderer ""}
     {-orderby ""}
+    {-type_map ""}
     {-with_checkboxes:boolean false}
   } {
 
@@ -127,11 +128,11 @@
       set sortable 0
     }
     if {$sortable} {
-      if {$att eq "_page_order"} {
-        $table_widget mixin add ::xo::OrderedComposite::IndexCompare
-      }
       #:msg "order=[expr {$order eq {asc} ? {increasing} : {decreasing}}] $att"
-      $table_widget orderby -order [expr {$order eq "asc" ? "increasing" : "decreasing"}] $att
+      $table_widget orderby \
+          -order [expr {$order eq "asc" ? "increasing" : "decreasing"}] \
+          -type [ad_decode $att _page_order index {*}$type_map dictionary] \
+          $att
     }
     return $table_widget
   }