ICEfaces
  1. ICEfaces
  2. ICE-9869

New mobi:dataView, dataViewColumn(s), and dataViewDetails components

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.BETA, 4.0
    • Component/s: MOBI-Components
    • Labels:
      None
    • Environment:
      ICEfaces 4
    • Assignee Priority:
      P1
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial

      Description

      mobi:dataView component renders a table region for iterative output using columns defined with the required DataViewColumns component child, and a detail region for extensive viewing (and editing) of the row objects of the table model. The detail region is defined with the DataViewDetails child component and it's contents are displayed when a row of table region is activated, typically by a row tap.

      mobi:dataViewColumns defines a column in the table region of the DataView component.

      mobi:dataViewColumns component defines the table region of the DataView component either by its DataViewColumn child components or by attaching an implementationof DataViewColumnsModel to the 'value' attribute of this component.

      mobi:dataViewDetail - The child components of this component define the region to be displayed when a row object of DataView table region is activated. When DataView 'activationMode' is set to 'server' the child components of this region may be arbitrary JSF components. When 'activationMode' is set to 'client' the child components of this region are prerendered and have their dynamic attributes cached on the client to allow instantaneous activation. Client activation mode is restricted to particular components and only particular attributes of these components may be dynamic, the specifics are documented on our wiki.

        Activity

        Hide
        Cruz Miraback added a comment -

        Test Results

        ICEfaces4 trunk revision# 40043

        General:
        1) The rowIndexVar attribute doesn't seem to do anything, I tried printing it out in a dataViewColumn and in the dataViewDetails region but it is always empty.

        2) Trying to use the markup attribute just throws a NullPointerException. This is probably because getMarkup() in org.icefaces.mobi.component.dataview.DataViewColumn.java is just returning null and not the actual value from the page. Currently the attribute is unusable.

        3) The reactivePriority attribute isn't always respected. A column of type boolean with low priority will remain visible while columns with higher priority are hidden.

        4) There are JS errors when changing reactiveColumnVisibility, reactivePriority and activationMode attributes dynamically:

        Error when changing reactiveColumnVisibility or activationMode dynamically:
        [window] Error [status: malformedXML code: 200]: During update: form:dataView_js not found

        Error when changing reactivePriority dynamically:
        [window] Error [status: malformedXML code: 200]: Argument 1 of Node.replaceChild is not an object.

        5) Setting activeRowIndex to null displays the first row in the detail region (same results as 0). It seems null should display nothing in the detail region because currently a row always appears active/selected if using this attribute.

        Styling issues:
        1) There is no styling (incl. header/footer) on the dataView unless using rowStripe and rowStroke attributes.

        2) When using a column with the "bool" type no checkbox is rendered because the styling is missing.

        3) The rows cannot be selected in the desktop view like they can be in showcase, think this might be something related to the styling? They can be selected on a mobile device.

        Doc issues:
        1) Rendered attribute not listed in the tlddoc for dataViewColumn component but attribute is functional and used in showcase demo.

        2) tlddoc for dataViewColumn type attribute reads "..f:dateTimeConverter..", but it should be "..f:convertDateTime..".

        Not tested:
        1) I haven't created a test for the value attribute of dataViewColumns because there is no documentation when implementing DataViewColumnsModel. It's difficult to understand the implemented methods.

        2) Uncertain best way to test the "client" activationMode.

        Show
        Cruz Miraback added a comment - Test Results ICEfaces4 trunk revision# 40043 General: 1) The rowIndexVar attribute doesn't seem to do anything, I tried printing it out in a dataViewColumn and in the dataViewDetails region but it is always empty. 2) Trying to use the markup attribute just throws a NullPointerException. This is probably because getMarkup() in org.icefaces.mobi.component.dataview.DataViewColumn.java is just returning null and not the actual value from the page. Currently the attribute is unusable. 3) The reactivePriority attribute isn't always respected. A column of type boolean with low priority will remain visible while columns with higher priority are hidden. 4) There are JS errors when changing reactiveColumnVisibility, reactivePriority and activationMode attributes dynamically: Error when changing reactiveColumnVisibility or activationMode dynamically: [window] Error [status: malformedXML code: 200] : During update: form:dataView_js not found Error when changing reactivePriority dynamically: [window] Error [status: malformedXML code: 200] : Argument 1 of Node.replaceChild is not an object. 5) Setting activeRowIndex to null displays the first row in the detail region (same results as 0). It seems null should display nothing in the detail region because currently a row always appears active/selected if using this attribute. Styling issues: 1) There is no styling (incl. header/footer) on the dataView unless using rowStripe and rowStroke attributes. 2) When using a column with the "bool" type no checkbox is rendered because the styling is missing. 3) The rows cannot be selected in the desktop view like they can be in showcase, think this might be something related to the styling? They can be selected on a mobile device. Doc issues: 1) Rendered attribute not listed in the tlddoc for dataViewColumn component but attribute is functional and used in showcase demo. 2) tlddoc for dataViewColumn type attribute reads "..f:dateTimeConverter..", but it should be "..f:convertDateTime..". Not tested: 1) I haven't created a test for the value attribute of dataViewColumns because there is no documentation when implementing DataViewColumnsModel. It's difficult to understand the implemented methods. 2) Uncertain best way to test the "client" activationMode.
        Show
        Cruz Miraback added a comment - Test application is located at: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Manual/dataView
        Hide
        Arturo Zambrano added a comment - - edited

        Indirectly fixed the missing styling issue at revision 40097.

        At revision 40101, removed IDataView interface and added font awesome resource dependency to display columns of type bool.

        Show
        Arturo Zambrano added a comment - - edited Indirectly fixed the missing styling issue at revision 40097. At revision 40101, removed IDataView interface and added font awesome resource dependency to display columns of type bool.
        Hide
        Arturo Zambrano added a comment -

        Fixed documentation issues at revision 40103.

        Show
        Arturo Zambrano added a comment - Fixed documentation issues at revision 40103.
        Hide
        Arturo Zambrano added a comment -

        Added support for 'rowIndexVar' at revision 40112.

        Show
        Arturo Zambrano added a comment - Added support for 'rowIndexVar' at revision 40112.
        Hide
        Arturo Zambrano added a comment -

        As for issue #5, it seems that the same situation happens with any property of Integer type. If the attribute doesn't appear in the component tag, then the value is null, and things work as expected, but when the attribute appears in the tab, it is automatically made non-null and the default Integer object is created, which has a value of 0. This happens even if you explicitly set the value of the property to null.

        It is not clear if this is a problem with the generator or if it simply has to do with generics converting to the native int type at some point. It's not possible to compare with the stock JSF components, since none of their properties is of Integer type. Only the property 'tabindex' is handled as an Integer type, but in the documentation it is actually a String, which is converted to Integer.

        As is common in many different areas of Java, when dealing with indexes, a value of -1 (or any negative value) will be treated as the index not being set or not being valid. So the DataView code was modified to handle negative values of 'activeRowIndex' as no index specified. The TLD documentation was also updated to describe this behaviour.

        Committed fix to trunk at revision 40115.

        Show
        Arturo Zambrano added a comment - As for issue #5, it seems that the same situation happens with any property of Integer type. If the attribute doesn't appear in the component tag, then the value is null, and things work as expected, but when the attribute appears in the tab, it is automatically made non-null and the default Integer object is created, which has a value of 0. This happens even if you explicitly set the value of the property to null. It is not clear if this is a problem with the generator or if it simply has to do with generics converting to the native int type at some point. It's not possible to compare with the stock JSF components, since none of their properties is of Integer type. Only the property 'tabindex' is handled as an Integer type, but in the documentation it is actually a String, which is converted to Integer. As is common in many different areas of Java, when dealing with indexes, a value of -1 (or any negative value) will be treated as the index not being set or not being valid. So the DataView code was modified to handle negative values of 'activeRowIndex' as no index specified. The TLD documentation was also updated to describe this behaviour. Committed fix to trunk at revision 40115.
        Hide
        Arturo Zambrano added a comment -

        Fixed issue #4 at revision 40116 by removing the client id from the <script> element, in order to avoid domdiff trying to update that node, which is usually removed from the markup; the wrapping span element will be used instead.

        Show
        Arturo Zambrano added a comment - Fixed issue #4 at revision 40116 by removing the client id from the <script> element, in order to avoid domdiff trying to update that node, which is usually removed from the markup; the wrapping span element will be used instead.
        Hide
        Arturo Zambrano added a comment -

        As for issue #2, removed 'markup' attribute and its related handling at revision 40117, because it's not applicable to the facelet case, since we can't define arbitrary HTML in a facelet attribute.

        Show
        Arturo Zambrano added a comment - As for issue #2, removed 'markup' attribute and its related handling at revision 40117, because it's not applicable to the facelet case, since we can't define arbitrary HTML in a facelet attribute.
        Hide
        Arturo Zambrano added a comment -

        As for issue #3, it seems like the reactive priority feature wasn't implemented at all in the client. There's no code that reads the array of column priorities in the Javascript code of dataView.

        Show
        Arturo Zambrano added a comment - As for issue #3, it seems like the reactive priority feature wasn't implemented at all in the client. There's no code that reads the array of column priorities in the Javascript code of dataView.
        Hide
        Arturo Zambrano added a comment -

        Removed reactive column visibility functionality at revision 40274, since it was incomplete. Created ICE-9893 to completely implement such functionality.

        Show
        Arturo Zambrano added a comment - Removed reactive column visibility functionality at revision 40274, since it was incomplete. Created ICE-9893 to completely implement such functionality.
        Hide
        Ken Fyten added a comment -

        DataView row selection via single click on the row isn't working. This should highlight the selected row and populate the editable region in the dataView with that rows contents. Seems to work in ICEmobile 1.3 on Safari, but not FF for some reason.

        Show
        Ken Fyten added a comment - DataView row selection via single click on the row isn't working. This should highlight the selected row and populate the editable region in the dataView with that rows contents. Seems to work in ICEmobile 1.3 on Safari, but not FF for some reason.
        Hide
        Cruz Miraback added a comment - - edited

        ICEfaces4 trunk revision# 40274

        #1 - confirmed fixed, the rowIndexVar attribute is now functioning.
        #2 - nothing to confirm, removed markup attribute from tests since it is not valid.
        #3 - nothing to confirm, will leave reactivePriority in tests so it is there when ICE-9893 is complete.
        #4 - confiremd fixed, JS errors are no longer present.
        #5 - confirmed new behaviour is working as expected.

        All styling issues (#1,#2,#3) are confirmed fixed.
        All doc issues (#1,#2) are confirmed fixed.

        No issues remaining from initial report.

        Show
        Cruz Miraback added a comment - - edited ICEfaces4 trunk revision# 40274 #1 - confirmed fixed, the rowIndexVar attribute is now functioning. #2 - nothing to confirm, removed markup attribute from tests since it is not valid. #3 - nothing to confirm, will leave reactivePriority in tests so it is there when ICE-9893 is complete. #4 - confiremd fixed, JS errors are no longer present. #5 - confirmed new behaviour is working as expected. All styling issues (#1,#2,#3) are confirmed fixed. All doc issues (#1,#2) are confirmed fixed. No issues remaining from initial report.
        Hide
        Cruz Miraback added a comment -

        Row selection issue reported by Ken can be reproduced in Firefox27. In Chrome and IE11 the rows can be selected and the dataViewDetails region shown but they cannot be de-selected.

        Show
        Cruz Miraback added a comment - Row selection issue reported by Ken can be reproduced in Firefox27. In Chrome and IE11 the rows can be selected and the dataViewDetails region shown but they cannot be de-selected.
        Hide
        Arturo Zambrano added a comment - - edited

        Committed fix that solves activation issues (except in Firefox) at revision 40339. The Firefox issue is a JS error in the bridge-support code.

        To reproduce simply load dataViewDynAttribute.jsf in the test app, activate the 'rendered' checkbox to display the table, and try clicking on any (unselected) row a few times. An error will appear in the console, which occurs in the brdige-support code and seems to be related to logging.

        Show
        Arturo Zambrano added a comment - - edited Committed fix that solves activation issues (except in Firefox) at revision 40339. The Firefox issue is a JS error in the bridge-support code. To reproduce simply load dataViewDynAttribute.jsf in the test app, activate the 'rendered' checkbox to display the table, and try clicking on any (unselected) row a few times. An error will appear in the console, which occurs in the brdige-support code and seems to be related to logging.
        Hide
        Mircea Toma added a comment -

        Modified isRowEvent function to alternatively use Event.target property in browsers where the equivalent Event.srcElement property is not available.

        Show
        Mircea Toma added a comment - Modified isRowEvent function to alternatively use Event.target property in browsers where the equivalent Event.srcElement property is not available.
        Hide
        Cruz Miraback added a comment -

        ICEfaces4 trunk revision# 40400

        Confirmed JS error in Firefox no longer occurs and that the rows can be selected.

        Show
        Cruz Miraback added a comment - ICEfaces4 trunk revision# 40400 Confirmed JS error in Firefox no longer occurs and that the rows can be selected.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Ken Fyten
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: