public final class WidgetPageMethods extends Object
Constructor and Description |
---|
WidgetPageMethods(io.toro.cde.core.processor.CompilerManager compilerManager,
io.toro.cde.core.widget.WidgetService widgetService,
io.toro.cde.core.page.PageService pageService) |
Modifier and Type | Method and Description |
---|---|
static String |
page(String uri)
Parse a page.
|
static String |
page(String uri,
Map context)
Parse a page.
|
static String |
widget(String widgetName)
Parse a widget.
|
static String |
widget(String widgetName,
Map params)
Parse a widget.
|
@Autowired WidgetPageMethods(io.toro.cde.core.processor.CompilerManager compilerManager, io.toro.cde.core.widget.WidgetService widgetService, io.toro.cde.core.page.PageService pageService)
public static String widget(String widgetName) throws Exception
Parse a widget.
Example usage:
println 'exampleWidget'.widget()
widgetName
- the widget nameException
public static String widget(String widgetName, Map params) throws Exception
Parse a widget.
Example usage:
println 'exampleWidget'.widget( [ : ] )
widgetName
- the widget nameparams
- widget map parametersException
public static String page(String uri) throws Exception
Parse a page.
Example usage:
def pageData = '/page1'.page( ) 'smtp://esb.user%40gmail.com:password@smtp.gmail.com:587/here%is%your%report'.send([to: 'friend@gmail.com'], pageData);
uri
- URI of the pageException
public static String page(String uri, Map context) throws Exception
Parse a page.
Example usage:
def params = ['example' : 'exampleValue', 'example2' : 'exampleValue2' ] def pageData = '/page1'.page( params ) 'smtp://esb.user%40gmail.com:password@smtp.gmail.com:587/here%is%your%report'.send([to: 'friend@gmail.com'], pageData);
uri
- URI of the pagecontext
- a map containing the variables you want to pass to the page for parsing againstException
Copyright © 2020. All rights reserved.