Package org.apache.ofbiz.widget.model
Class ModelScreen
java.lang.Object
org.apache.ofbiz.widget.model.ModelWidget
org.apache.ofbiz.widget.model.ModelScreen
- All Implemented Interfaces:
Serializable
Widget Library - Screen model class
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.ofbiz.widget.model.ModelWidget
ModelWidget.NamedBorderType
-
Field Summary
Fields inherited from class org.apache.ofbiz.widget.model.ModelWidget
ENABLE_BOUNDARY_COMMENTS_PARAM
-
Constructor Summary
ConstructorDescriptionModelScreen
(Element screenElement, Map<String, ModelScreen> modelScreenMap, String sourceLocation) XML Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(ModelWidgetVisitor visitor) getDelegator
(Map<String, Object> context) Gets delegator.getDispatcher
(Map<String, Object> context) Gets dispatcher.Gets model screen map.Gets section.Gets source location.Gets transaction timeout.boolean
Gets use cache.boolean
Gets use transaction.void
renderScreenString
(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) Renders this screen to a String, i.e.Methods inherited from class org.apache.ofbiz.widget.model.ModelWidget
getBoundaryCommentName, getName, getStartColumn, getStartLine, getSystemId, toString, widgetBoundaryCommentsEnabled, widgetNamedBorderType
-
Constructor Details
-
ModelScreen
public ModelScreen(Element screenElement, Map<String, ModelScreen> modelScreenMap, String sourceLocation) XML Constructor
-
-
Method Details
-
accept
- Specified by:
accept
in classModelWidget
- Throws:
Exception
-
getTransactionTimeout
Gets transaction timeout.- Returns:
- the transaction timeout
-
getModelScreenMap
Gets model screen map.- Returns:
- the model screen map
-
getUseTransaction
public boolean getUseTransaction()Gets use transaction.- Returns:
- the use transaction
-
getUseCache
public boolean getUseCache()Gets use cache.- Returns:
- the use cache
-
getSection
Gets section.- Returns:
- the section
-
getSourceLocation
Gets source location.- Returns:
- the source location
-
renderScreenString
public void renderScreenString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws ScreenRenderExceptionRenders this screen to a String, i.e. in a text format, as defined with the ScreenStringRenderer implementation.- Parameters:
writer
- The Writer that the screen text will be written tocontext
- Map containing the screen context; the following are reserved words in this context: - parameters (contains any special initial parameters coming in) - userLogin (if a user is logged in) - autoUserLogin (if a user is automatically logged in, ie no password has been entered) - formStringRenderer - request, response, session, application (special case, only in HTML contexts, etc) - delegator, dispatcher, security - null (represents a null field value for entity operations) - sections (used for decorators to reference the sections to be decorated and render them)screenStringRenderer
- An implementation of the ScreenStringRenderer interface that is responsible for the actual text generation for different screen elements; implementing your own makes it possible to use the same screen definitions for many types of screen UIs- Throws:
ScreenRenderException
-
getDispatcher
Gets dispatcher.- Parameters:
context
- the context- Returns:
- the dispatcher
-
getDelegator
Gets delegator.- Parameters:
context
- the context- Returns:
- the delegator
-