ProgressController (taack-ui 0.4.0-SNAPSHOT API)
Package: taack.support

[Groovy] Class ProgressController

    • taack.support.ProgressController


    • @grails.compiler.GrailsCompileStatic
      @grails.plugin.springsecurity.annotation.Secured(value: isAuthenticated())
      class ProgressController
      extends java.lang.Object

      Support Controller for progressbar.

      Here is how to add a progress bar to a long duration job:

      String pId = taackUiProgressBarService.progressStart(CrewUiService.messageBlock("Done .."), rowCount)
        def task = task {
            customerRows.eachWithIndex { String[] row, int i ->
                importCustomer(row[1], row[2], row[3], row[4], row[5], row[6], row[7], row[8], row[9], row[10], row[11], row[12], row[13], row[14], row[15], row[16], row[17])
                taackUiProgressBarService.progress(pId, 1)
            
            contactRows.eachWithIndex { String[] row, int i ->
                importContact(currentUser, row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7], row[8])
                taackUiProgressBarService.progress(pId, 1)
            }
            taackUiProgressBarService.progressEnded(pId)
        }
      }

      • Methods Summary

          Methods 
          Type Params Return Type Name and description
          java.lang.Object drawProgress(java.lang.String id)
          java.lang.Object echoSelect(java.lang.Long id, java.lang.String label)
      • Inherited Methods Summary

          Inherited Methods 
          Methods inherited from class Name
          class java.lang.Object java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
      • Constructor Detail

        • ProgressController()

      • Method Detail

        • java.lang.Object drawProgress(java.lang.String id)

        • java.lang.Object echoSelect(java.lang.Long id, java.lang.String label)