Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I have been using the example in the ee-composite showcase as a template for writing my own rich data grid web application. It seems that data is provided to the grid through the constructor of RichDataGridBean. However, when i commit data to the database outside the web application the data doesnt appear in the grid. Is there a refresh operation in the RichDataGridBean, or a way to insert a new data set? I can, of course, reconstruct the whole bean, but i guess thats not the right way to deal with data updates in the grid. Please help me find a workaround for this problem.

        Activity

        Hide
        Tyler Johnson added a comment - - edited

        Hi Aksel,

        I would recommend using AJAX push. When the database is updated, you would push updates out to the page using the PushRenderer. You can find implementation details here:
        http://wiki.icefaces.org/display/ICE/Ajax+Push+-+APIs

        BRegards,

        Tyler Johnson

        Show
        Tyler Johnson added a comment - - edited Hi Aksel, I would recommend using AJAX push. When the database is updated, you would push updates out to the page using the PushRenderer. You can find implementation details here: http://wiki.icefaces.org/display/ICE/Ajax+Push+-+APIs BRegards, Tyler Johnson
        Hide
        Ren Tech added a comment -

        Hi, and thanks for your answer.
        Im my case, the users push a button to regenerate data in the grid.
        However, im not sure how to set the new list in the richDataGridBean.
        When I initialize the bean, i contruct the bean as follows:
        richDataGridBean = new RichDataGridBean(datalist, columns, editableRowProperty, null );
        When I update datalist in the backingbean with a new set, it doesnt appear in my datagrid. So how can I insert datalist into richDataGridBean without reconstructing it?

        Show
        Ren Tech added a comment - Hi, and thanks for your answer. Im my case, the users push a button to regenerate data in the grid. However, im not sure how to set the new list in the richDataGridBean. When I initialize the bean, i contruct the bean as follows: richDataGridBean = new RichDataGridBean(datalist, columns, editableRowProperty, null ); When I update datalist in the backingbean with a new set, it doesnt appear in my datagrid. So how can I insert datalist into richDataGridBean without reconstructing it?
        Hide
        Tyler Johnson added a comment - - edited

        Hey Aksel,

        Reconstructing the bean looks to be the only option so I would suggest moving the initialize call into a method like initializeRichDataGrids(). You can then call this method whenever bean data has changed. This is actually how we have done it in our component showcase. Can you try this out?

        Thanks,

        Ty

        Show
        Tyler Johnson added a comment - - edited Hey Aksel, Reconstructing the bean looks to be the only option so I would suggest moving the initialize call into a method like initializeRichDataGrids(). You can then call this method whenever bean data has changed. This is actually how we have done it in our component showcase. Can you try this out? Thanks, Ty
        Hide
        Ren Tech added a comment -

        Hi again Tyler,
        we managed to solve the issue ourselves. By inspecting the source code for RichDataGridBean we found a way to update the list. The following method inserts a new list into the grid:
        richDataGridBean.getData().setWrappedData(datalist);

        I suggest that you implement a setter method for this in the RichDataGridBean so people can update the grid in a straight forward way.

        Show
        Ren Tech added a comment - Hi again Tyler, we managed to solve the issue ourselves. By inspecting the source code for RichDataGridBean we found a way to update the list. The following method inserts a new list into the grid: richDataGridBean.getData().setWrappedData(datalist); I suggest that you implement a setter method for this in the RichDataGridBean so people can update the grid in a straight forward way.
        Hide
        Tyler Johnson added a comment -

        Excellent. You are more welcome than to modify the component as you see fit. I will definitely send a note out to our team regarding whether it should be considered for our next release.

        We tend to shy away from suggesting code changes since we prefer to support our officially tested version. Am I okay to close this case?

        Thanks,

        Tyler

        Show
        Tyler Johnson added a comment - Excellent. You are more welcome than to modify the component as you see fit. I will definitely send a note out to our team regarding whether it should be considered for our next release. We tend to shy away from suggesting code changes since we prefer to support our officially tested version. Am I okay to close this case? Thanks, Tyler
        Hide
        Ren Tech added a comment -

        Yes, you can close the case.
        Im satisfied that we solved it without changing any of the Icefaces source code.

        Show
        Ren Tech added a comment - Yes, you can close the case. Im satisfied that we solved it without changing any of the Icefaces source code.
        Hide
        Ken Fyten added a comment -

        Marking as Closed / Invalid as part of legacy ICEfaces ICE / Compat component JIRA cleanup.

        Note: This issue may be resolved in a newer ICEfaces release, available here: http://www.icesoft.org/java/downloads/icefaces-downloads.jsf

        If the issue persists with the current ICEfaces release, please create a new JIRA for it.

        Show
        Ken Fyten added a comment - Marking as Closed / Invalid as part of legacy ICEfaces ICE / Compat component JIRA cleanup. Note: This issue may be resolved in a newer ICEfaces release, available here: http://www.icesoft.org/java/downloads/icefaces-downloads.jsf If the issue persists with the current ICEfaces release, please create a new JIRA for it.

          People

          • Assignee:
            Unassigned
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: