Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 4.1
-
Component/s: ACE-Components
-
Labels:None
-
Environment:ICEfaces 4
-
Assignee Priority:P1
-
Affects:Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial
Description
The ace:dataTable would benefit from being able to support responsive rendering of its columns to better display on narrower displays, such as on mobile devices.
A couple of possibilities exist for this:
1. Priority-based rendering of columns. Each column can optionally be tagged with a "priority" attribute and only those columns that can be rendered completely in the available dataTable width are rendered, starting with the lowest priority to greatest priority.
2. Automatic column-stacking. Columns are automatically stacked with their immediate neighbours as deep as required to fit them all in the available dataTable width. This could leverage the existing column-stacking support, but basically defines the stacks automatically based on the column and dataTable widths.
A couple of possibilities exist for this:
1. Priority-based rendering of columns. Each column can optionally be tagged with a "priority" attribute and only those columns that can be rendered completely in the available dataTable width are rendered, starting with the lowest priority to greatest priority.
2. Automatic column-stacking. Columns are automatically stacked with their immediate neighbours as deep as required to fit them all in the available dataTable width. This could leverage the existing column-stacking support, but basically defines the stacks automatically based on the column and dataTable widths.
It seems like the server would have to know the size of the user agent viewport in order to render the prioritized columns or the stacked columns. The ClientDescriptor class doesn't currently provide this information; it only tells whether it's a mobile (handheld) device, a tablet or desktop. One option would be to assume default viewport sizes for the different device categories or investigating the possibility of including the viewport dimensions in the ClientDescriptor class.