public final class WidgetPageMethods extends Object
This class allows users to get the content of a widget/page created from the Pagebuilder
Modifier and Type | Method and Description |
---|---|
static String |
page(String uri)
Parse Page.
|
static String |
page(String uri,
Map context)
Parse Page.
|
static String |
widget(String widgetName)
Parse Widget.
|
static String |
widget(String widgetName,
Map params)
Parse Widget.
|
public static String widget(String widgetName) throws Exception
Parse Widget.
Example usage:
println 'exampleWidget'.widget()
widgetName
- The widget nameException
public static String widget(String widgetName, Map params) throws Exception
Parse Widget.
Example usage:
println 'exampleWidget'.widget( [ : ] )
widgetName
- The widget nameparams
- widget map parametersException
public static String page(String uri) throws Exception
Parse 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
- The URI of the pageException
public static String page(String uri, Map context) throws Exception
Parse 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
- The URI of the pagecontext
- A Map containing the variables you want to pass to the page for parsing againstException
Copyright © 2019. All rights reserved.