Wiki-Quellcode von BPE_4
                  Version 8.1 von Holger Engels am 2024/02/02 14:13
              
      Zeige letzte Bearbeiter
| author | version | line-number | content | 
|---|---|---|---|
| 1 | {{groovy}} | ||
| 2 | import org.xwiki.context.* | ||
| 3 | def context = services.component.getInstance(Execution.class).getContext() | ||
| 4 | def printing = context.getProperty("printing") | ||
| 5 | println("lala " + printing); | ||
| 6 | println("lolo " + xcontext.get("printing")) | ||
| 7 | |||
| 8 | println(services.job.getCurrentJobStatus(['export', 'pdf'])?.request) | ||
| 9 | |||
| 10 | def expectedTemplateReference = services.model.resolveDocument('XWiki.BPE Print Template') | ||
| 11 | def actualTemplateReference = services.job.getCurrentJobStatus(['export', 'pdf'])?.request?.template | ||
| 12 | if (expectedTemplateReference.equals(actualTemplateReference)) | ||
| 13 | println("Printing") | ||
| 14 | else | ||
| 15 | println("Not printing") | ||
| 16 | {{/groovy}} |