Web / Apache OFBiz Interview questions
Explain the internal working of the Screen Widget rendering pipeline?
Rendering a screen is a two-phase process: gather data, then render layout.
flowchart LR
A[Request hits Control Servlet] --> B[RequestHandler resolves view to a screen]
B --> C[Screen actions run: service calls, entity queries]
C --> D[Widgets composed: decorator, sections, sub-screens/forms/menus]
D --> E[Renderer HTML/FTL, XML, or PDF walks widget tree]
E --> F[Final markup sent to browser]
The actions block of a screen element runs first and populates the context map - usually via <service> or <entity-condition> elements - with the data the page needs. Only after that does the widgets block run, walking a tree of decorator-screen, section, include-form, and include-menu elements.
Each renderer implementation (the default HTML/FreeMarker renderer, or alternate ones for XML export or PDF) interprets the same widget tree differently, which is exactly how one screen definition can serve a browser page and a printable document from identical XML.
More Related questions...