title: Grails - Send List of objects in params of redirect
body: <p>My problem is that i want to preview data on index view without saving data in database. For this purpose, I want to send the list of objects in params section of redirect. And on receiving action want to use that list of objects.But when i include as below</p>
  
  <pre><code>def preview(){
  //some code
  redirect action: "index", params:[planId:params.planId, beamsInfoList: beamsInfoList]
  }
  </code></pre>
  
  <p>I want something like below to happen.</p>
  
  <pre><code>def index() { 
      //some code
      try{
  
          planInfo.beamInfo = (params.beamsInfoList==null)?planInfo.beamInfo:params.beamsInfoList //beamInfo is also list
  
          //some code
  
      Object[] obj = GRMUtils.calculateTotalBeamsPower(planInfo.beamInfo)
      totalPlanPower = (Float)obj[0];
      beamPowerMap= (Map&lt;Integer, String&gt;)obj[1];
      AmMapUtility utility=new AmMapUtility()
      output = utility.generateAMmapFromBeams(planInfo.beamInfo, GRMConstants.POWER_MAP_PAGE);
      if(null==output){
          flash.error = message(code: 'beammap.noinfoerror.message')
      }
      }catch(Exception e){
      log.error "Excepton occured while loading Power Map", e
  }
      respond beams, model:[centerLong:output.getCenterLongitude(),centerLat:output.getCenterLatitude(),amMapImageProperty:output.getMapImages(),
          amMapLinesProperty:output.getMapLines(), planId:params.planId, planInfo:planInfo, powersControlCarrier: powersControlCarrier, powersTrafficCarrier:powersTrafficCarrier,satPower: planInfo.satellite.satelliteMaxPower, totalPlanPower: totalPlanPower, gatewayPower: planInfo.gateway.gatewayAggregateEIRP,fesOutputPowerLimit:fesOutputPowerLimit, beamPowerMap: beamPowerMap,powerRangeColorMap:output.getReuseColorMap()]
  
  }
  </code></pre>
  
  <p>It does not redirect to index method and not showing any errors. Both actions are in same controller. I have used flash, but its not helping either as value reflected on second request. I have tried session too, but i am getting error</p>
  
  <pre><code>org.hibernate.LazyInitializationException: could not initialize proxy - no Session
  </code></pre>
  
  <p>on some DB fetch. I am stuck. I am new to grails and groovy. Please help.</p>
  
  <p>Edit: i have found my list is large, that is why its not redirecting. Please help me with another alternative like how can i use request attribute if it is possible?</p>