Beehive
  1. Beehive
  2. BEEHIVE-276

Can we update Trees without round trip to the server?

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: NetUI
    • Labels:
      None
    • Environment:
      Browser

      Description

      I have a page called Record Product Delivery that contains a tree and a form. The tree lists products currently in the system. When the user clicks on a product in the tree, the SKU field in the form is updated with the product SKU. The user then enters the quantity delivered and saves the update to inventory.

      In the case that a product was delivered that is not yet in inventory, the user may click on 'Add new product'. That causes a popup that records the new product details. When the popup exits, I would like the tree refreshed and the SKU field updated with the new SKU.

      <netui:anchor action="beginNewProduct" popup="true">
      Add New Product
      <netui:configurePopup height="200" width="200">
      <netui:retrievePopupOutput tagIdRef="productTree"
      dataSource="pageFlow.productTree"/>
      <netui:retrievePopupOutput tagIdRef="sku"
      dataSource="outputFormBean.sku"/>
      </netui:configurePopup>

      If I attempt to use that code, my page dies with JavaScript error. It would be my preference that the tree actually update. Right now, this is not intended to work because retrievePopupOutput is only intended to update fields that contain simple values.

      Please consider tying async tree updates in with this retrievePopupOutput tag.

      • jeremiah

        Activity

        Hide
        Daryl Olander added a comment -

        I don't believe that using the popup update is the right way to do this. The generalization of this problem is that external events (in this case the popup submit) can update the state of the tree. This is probably less common than other things which can cause the underlying tree state to be updated.

        What we need is a general machanism for updating a tree on a page if the state has changed on the server. I've been playing around with something like this with the DivPanel, but it's not yet ready for prime time.

        I'm going to grab this issue, but I doubt it will ship in 1.0.

        Show
        Daryl Olander added a comment - I don't believe that using the popup update is the right way to do this. The generalization of this problem is that external events (in this case the popup submit) can update the state of the tree. This is probably less common than other things which can cause the underlying tree state to be updated. What we need is a general machanism for updating a tree on a page if the state has changed on the server. I've been playing around with something like this with the DivPanel, but it's not yet ready for prime time. I'm going to grab this issue, but I doubt it will ship in 1.0.

          People

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

            Dates

            • Created:
              Updated:

              Development