cancel
Showing results for 
Search instead for 
Did you mean: 

After change in backoffice list view autorefresh

saood
Participant
0 Kudos

Hi all,

I written one action class for a button in backoffice as `

 @Override
     public ActionResult<HashSet<ConsignmentModel>> 
 perform(ActionContext<HashSet<ConsignmentModel>> 
 actionContext) {
         if (!actionContext.getData().isEmpty()){
             HashSet<ConsignmentModel> consignments = actionContext.getData();
             this.releaseDocuments(consignments);
             return new ActionResult(ActionResult.SUCCESS);
         }
         LOG.error("Consignment must be selected");
         return new ActionResult(ActionResult.ERROR);
     }
 private void releaseDocuments(HashSet consignmentModels){
         ServicesUtil.validateParameterNotNull(consignmentModels, "Consignment list cannot be null");
         for(ConsignmentModel consignmentModel : consignmentModels){
             if(ConsignmentStatus.READY.getCode().equals(consignmentModel.getStatus().getCode())) 
             {
             consignmentModel.setStatus(ConsignmentStatus.READY_FOR_PICKUP); 
             modelService.save(consignmentModel); 
             modelService.refresh(consignmentModel); 
             }
         } 
        
     }


It is working fine. But I need to refresh the consignment list view after that to show automatically.

Now we need to either refresh or click on search to know the change.

Is it possible to refresh the list automatically.

Accepted Solutions (0)

Answers (0)