Package org.apache.ofbiz.widget.model
Class ModelWidget
java.lang.Object
org.apache.ofbiz.widget.model.ModelWidget
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ModelForm
,ModelMenu
,ModelMenuItem
,ModelScreen
,ModelScreenWidget
,ModelScreenWidget.Column
,ModelTree
,ModelTree.ModelNode
,ModelTree.ModelNode.ModelSubNode
Widget Library - Widget model class. ModelWidget is a base class that is
extended by other widget model classes.
- See Also:
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The parameter name used to control widget boundary comments. -
Constructor Summary
ModifierConstructorDescriptionprotected
ModelWidget
(String name) Derived classes must call this constructor.protected
ModelWidget
(Element widgetElement) Derived classes must call this constructor. -
Method Summary
Modifier and TypeMethodDescriptionabstract void
accept
(ModelWidgetVisitor visitor) Returns the widget's name to be used in boundary comments.getName()
Returns the widget's name.int
Returns the column where this widget was defined, in it's containing xml file.int
Returns the line where this widget was defined, in it's containing xml file.Returns the url as a string, from where this widget was defined.toString()
static boolean
widgetBoundaryCommentsEnabled
(Map<String, ? extends Object> context) Returnstrue
if widget boundary comments are enabled.static ModelWidget.NamedBorderType
determine how to display named border for development
-
Field Details
-
ENABLE_BOUNDARY_COMMENTS_PARAM
The parameter name used to control widget boundary comments. Currently set to "widgetVerbose".- See Also:
-
-
Constructor Details
-
ModelWidget
Derived classes must call this constructor.- Parameters:
name
- The widget name
-
ModelWidget
Derived classes must call this constructor.- Parameters:
widgetElement
- The XML Element for the widget
-
-
Method Details
-
accept
- Throws:
Exception
-
getName
Returns the widget's name.- Returns:
- Widget's name
-
getSystemId
Returns the url as a string, from where this widget was defined.- Returns:
- url
-
getStartColumn
public int getStartColumn()Returns the column where this widget was defined, in it's containing xml file.- Returns:
- start column
-
getStartLine
public int getStartLine()Returns the line where this widget was defined, in it's containing xml file.- Returns:
- start line
-
toString
-
getBoundaryCommentName
Returns the widget's name to be used in boundary comments. The default action is to return the widget's name. Derived classes can override this method to return a customized name.- Returns:
- Name to be used in boundary comments
-
widgetBoundaryCommentsEnabled
Returnstrue
if widget boundary comments are enabled. Widget boundary comments are enabled by settingwidget.verbose=true
in thewidget.properties
file. Thetrue
setting can be overridden inweb.xml
or in the screen rendering context. Ifwidget.verbose
is set tofalse
in thewidget.properties
file, then that setting will override all other settings and disable all widget boundary comments.- Parameters:
context
- Optional context Map
-
widgetNamedBorderType
determine how to display named border for development- Returns:
- NamedBorderType from
widget.dev.namedBorder
property
-