ICEfaces
  1. ICEfaces
  2. ICE-1228

Seam: need to support @DataModelSelectionIndex

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.2
    • Fix Version/s: 1.6DR#3, 1.6
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Operating System: Windows XP
      Platform: PC

      Issue Links

        Activity

        Philip Breau created issue -
        Icefaces Administrator made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 1298 12497
        Ken Fyten made changes -
        Assignee Ted Goddard [ ted.goddard ]
        Ken Fyten made changes -
        Fix Version/s 1.6 [ 10031 ]
        Hide
        Ken Fyten added a comment -

        This issue needs to be analyzed along with other Seam related issues and distilled to root causes.

        Show
        Ken Fyten added a comment - This issue needs to be analyzed along with other Seam related issues and distilled to root causes.
        Ken Fyten made changes -
        Estimated Complexity Medium
        Fix Version/s 1.6DR#2 [ 10040 ]
        Fix Version/s 1.6 [ 10031 ]
        Assignee Priority P1
        Assignee Greg Dick [ greg.dick ]
        Ken Fyten made changes -
        Fix Version/s 1.6 [ 10031 ]
        Fix Version/s 1.6DR#2 [ 10040 ]
        Ken Fyten made changes -
        Assignee Greg Dick [ greg.dick ] Adnan Durrani [ adnan.durrani ]
        Ken Fyten made changes -
        Fix Version/s 1.6DR#3 [ 10050 ]
        Fix Version/s 1.6 [ 10031 ]
        Hide
        Ken Fyten added a comment -

        @DataModel cases are currently all working with the test cases we have available.

        Show
        Ken Fyten added a comment - @DataModel cases are currently all working with the test cases we have available.
        Ken Fyten made changes -
        Assignee Adnan Durrani [ adnan.durrani ] Greg Dick [ greg.dick ]
        Ken Fyten made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 1.6 [ 10031 ]
        Ken Fyten made changes -
        Link This issue blocks ICE-1810 [ ICE-1810 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1
        Assignee Greg Dick [ greg.dick ]
        Hide
        Greg Dick added a comment -

        I've created a test case for this. It does in fact work, but the way that our ICEfaces examples are written, it can lead you to construct an example which does not work.

        For my test, I had a List of objects. The List could be populated by a button, sort of to duplicate the behaviour of a database. The app also had buttons to start and end conversations.

        The @DataModel annotation allows the author to 'outject' a DataModel to the same context in which the containing component is. In the test app, I saw the appropriate model behaviour for the List. ie. the DataModel information was not preserved over redirects unless a long running conversation was started. You could put your backing bean component into various other scopes to achieve other behaviour. That's supported well.

        The @DataModelSelection allows the author to 'inject' the last selected table row's row Object. The @DataModelSelectionIndex allows the user to 'inject' the last selected row's index.

        The tricky part is the annotation. You can do the following

        @DataModel(name="data")
        private List someData;

        @DataModelSelection
        private Object dataRow;

        Then the list is outjected by the name 'data' automatically by Seam, and can be used directly in the expression language as follows:

        <h:dataTable var="row" value="#

        {data}

        "
        rendered="#

        {data.rowCount>0}

        ">

        When the above approach is used, the DataModelSelection or the DataModelSelectionIndex works just fine.

        What doesn't work is the following:

        @DataModel(name="data")
        private List someData;

        public List getSomeData()

        { return someData; }

        <h:dataTable var="row" value="#

        {someData}

        "
        rendered="#

        {someData.rowCount>0}

        ">

        Even though the expression is fully valid, and the datatable shows the data that is in the table, the 'injection' portion of the code no longer works. This is only a problem because all our examples are written using this notation, ( necessarily, because ICEfaces only applications don't have access to the @DataModel annotation) leading downloaders to migrate to ICEfaces using examples that don't work, as they stand.

        Show
        Greg Dick added a comment - I've created a test case for this. It does in fact work, but the way that our ICEfaces examples are written, it can lead you to construct an example which does not work. For my test, I had a List of objects. The List could be populated by a button, sort of to duplicate the behaviour of a database. The app also had buttons to start and end conversations. The @DataModel annotation allows the author to 'outject' a DataModel to the same context in which the containing component is. In the test app, I saw the appropriate model behaviour for the List. ie. the DataModel information was not preserved over redirects unless a long running conversation was started. You could put your backing bean component into various other scopes to achieve other behaviour. That's supported well. The @DataModelSelection allows the author to 'inject' the last selected table row's row Object. The @DataModelSelectionIndex allows the user to 'inject' the last selected row's index. The tricky part is the annotation. You can do the following @DataModel(name="data") private List someData; @DataModelSelection private Object dataRow; Then the list is outjected by the name 'data' automatically by Seam, and can be used directly in the expression language as follows: <h:dataTable var="row" value="# {data} " rendered="# {data.rowCount>0} "> When the above approach is used, the DataModelSelection or the DataModelSelectionIndex works just fine. What doesn't work is the following: @DataModel(name="data") private List someData; public List getSomeData() { return someData; } <h:dataTable var="row" value="# {someData} " rendered="# {someData.rowCount>0} "> Even though the expression is fully valid, and the datatable shows the data that is in the table, the 'injection' portion of the code no longer works. This is only a problem because all our examples are written using this notation, ( necessarily, because ICEfaces only applications don't have access to the @DataModel annotation) leading downloaders to migrate to ICEfaces using examples that don't work, as they stand.

          People

          • Assignee:
            Unassigned
            Reporter:
            Philip Breau
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: