1 Reply Latest reply on Jan 13, 2011 9:16 AM by grendizer

    Refreshing Parent fields after Back Navigation

    grendizer

      Maybe this is a redundant question here, but unfortunately I couldn't find any concrete indications to my case. So it's concerning the typical Parent/Childs navigation and parent refreshing issue.
      I have a Bean Network with one-to-many towards Subnetworks.


      On Network, there is an attribute volume which value is the sum of the Subnetworks volume values.
      I'd like to call my calculation-method (located in NetworkHome), so that if I edit an underlying subnetwork's volume value or add a new subnetwork with volume value, then navigate back to the parent Network, The sum will be shown on its textfield. I don't know how to solve this, for any idication I will be very thankful.


      Regards


      N.B.:
      Currently the user must navigate back to the network list, then edit the network to see the correct sum, because I tried to solve it temporarly by putting the calculation-method inside create(), like this:



      @Override
      public void create() {
      super.create();
      sumVolumesOfSubnetworks();
      }



        • 1. Re: Refreshing Parent fields after Back Navigation
          grendizer

          Wahid Atif wrote on Jan 12, 2011 11:38:


          On Network, there is an attribute volume which value is the sum of the Subnetworks volume values.
          I'd like to call my calculation-method (located in NetworkHome), so that if I edit an underlying subnetwork's volume value or add a new subnetwork with volume value, then navigate back to the parent Network, The sum will be shown on its textfield. I don't know how to solve this, for any idication I will be very thankful.



          Maybe my explanation is not really clear, so over again:
          By modifying the volume value of an existing subnetwork, or adding a new underlying subnetwork with some value for volume inside a Network, I need each time when I navigate back from Subnetwork-View to Network-View, to get dynamically the calculated sum value of all underlying subnetworks. Currently I'm able to do this only if I start over again from the Network List-view, because as said I'm calling the calculation method inside create().


          Please don't hesitate to post your hints. Thanks.