Class HtmlWidgetRenderer
java.lang.Object
org.apache.ofbiz.widget.renderer.html.HtmlWidgetRenderer
- Direct Known Subclasses:
FoFormRenderer
,HtmlMenuRenderer
,HtmlTreeRenderer
Widget Library - HTML Widget Renderer implementation. HtmlWidgetRenderer
is a base class that is extended by other widget HTML rendering classes.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ModelWidget.NamedBorderType
Store property value of widget.dev.namedBorderstatic final String
Characters that are appended to the end of each rendered element. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appendWhitespace
(Appendable writer) Helper method used to append whitespace characters to the end of each rendered element.static String
beginNamedBorder
(String widgetType, String location, String contextPath) Always check the following condition is true before running the method: HtmlWidgetRenderer.namedBorderType != ModelWidget.NamedBorderType.NONEstatic String
buildBoundaryComment
(String boundaryType, String widgetType, String widgetName) Helper method used to build the boundary comment string.static String
endNamedBorder
(String widgetType, String location) Always check the following condition is true before running the method: HtmlWidgetRenderer.namedBorderType != ModelWidget.NamedBorderType.NONEstatic String
formatBoundaryJsComment
(String boundaryType, String widgetType, String widgetName) static String
getAjaxParamsFromTarget
(String target) Extracts parameters from a target URL string, prepares them for an Ajax JavaScript call.boolean
Is widget comments enabled boolean.void
renderBeginningBoundaryComment
(Appendable writer, String widgetType, ModelWidget modelWidget) Renders the beginning boundary comment string.void
renderEndingBoundaryComment
(Appendable writer, String widgetType, ModelWidget modelWidget) Renders the ending boundary comment string.void
setWidgetCommentsEnabled
(boolean widgetCommentsEnabled) Sets widget comments enabled.
-
Field Details
-
WHITE_SPACE
Characters that are appended to the end of each rendered element. Currently set to CR/LF.- See Also:
-
NAMED_BORDER_TYPE
Store property value of widget.dev.namedBorder
-
-
Constructor Details
-
HtmlWidgetRenderer
public HtmlWidgetRenderer()
-
-
Method Details
-
setWidgetCommentsEnabled
public void setWidgetCommentsEnabled(boolean widgetCommentsEnabled) Sets widget comments enabled.- Parameters:
widgetCommentsEnabled
- the widget comments enabled
-
isWidgetCommentsEnabled
public boolean isWidgetCommentsEnabled()Is widget comments enabled boolean.- Returns:
- the boolean
-
appendWhitespace
Helper method used to append whitespace characters to the end of each rendered element.- Parameters:
writer
- The writer to write to- Throws:
IOException
-
buildBoundaryComment
public static String buildBoundaryComment(String boundaryType, String widgetType, String widgetName) Helper method used to build the boundary comment string.- Parameters:
boundaryType
- The boundary type: "Begin" or "End"widgetType
- The widget type: "Screen Widget", "Form Widget", etc.widgetName
- The widget name
-
beginNamedBorder
Always check the following condition is true before running the method: HtmlWidgetRenderer.namedBorderType != ModelWidget.NamedBorderType.NONE- Parameters:
widgetType
-location
-contextPath
-- Returns:
-
endNamedBorder
Always check the following condition is true before running the method: HtmlWidgetRenderer.namedBorderType != ModelWidget.NamedBorderType.NONE- Parameters:
widgetType
-location
-- Returns:
-
formatBoundaryJsComment
-
renderBeginningBoundaryComment
public void renderBeginningBoundaryComment(Appendable writer, String widgetType, ModelWidget modelWidget) throws IOException Renders the beginning boundary comment string.- Parameters:
writer
- The writer to write towidgetType
- The widget type: "Screen Widget", "Form Widget", etc.modelWidget
- The widget- Throws:
IOException
-
renderEndingBoundaryComment
public void renderEndingBoundaryComment(Appendable writer, String widgetType, ModelWidget modelWidget) throws IOException Renders the ending boundary comment string.- Parameters:
writer
- The writer to write towidgetType
- The widget type: "Screen Widget", "Form Widget", etc.modelWidget
- The widget- Throws:
IOException
-
getAjaxParamsFromTarget
Extracts parameters from a target URL string, prepares them for an Ajax JavaScript call. This method is currently set to return a parameter string suitable for the Prototype.js library.- Parameters:
target
- Target URL string- Returns:
- Parameter string
-