1
0
-1

how to custom link? I have wrote some codes,but I don't know how to set the beanshell href, what should I do?

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      i tested this new feature aso. if want to redirect, in beanshell script need to return a DataListActionResult object.

      import org.joget.apps.datalist.model.DataListActionResult;
       
      DataListActionResult result = new DataListActionResult();
      result.setType(DataListActionResult.TYPE_REDIRECT);
      result.setUrl("http://www.google.com");
      return result;
        CommentAdd your comment...
      1.  
        1
        0
        -1

        I'm not sure if I understand you correctly. Please correct me if I'm wrong.

        The purpose of the said plugin is to run the bean shell code, not to redirect to another hyperlink. When you click on the link generated, it will run the code.

        After the code is executed, it will simply redirect back to the same datalist page. (Do you want to modify the behavior here?)

        You can also check out the hyperlink action plugin if you need to customize the link on click.

        Just 2 my cents!

          CommentAdd your comment...