Chapter 3. The User Interface

In this chapter, we shall examine the following User Interface topics:

  • Building HTML web pages using the OFBiz Screen widget tool
  • Adding actions to Screen widget definitions
  • Adding HTML (and CSS) markup within Screen widget definitions
  • Platform-specific, Tree, Menu, and Form widgets
  • Creating HTML using FreeMarker
  • Passing parameters from the Screen widget to FreeMarker
  • Writing JavaScript to pop-up a new browser window in FreeMarker
  • Calling Java methods using FreeMarker directives
  • Forcing FreeMarker to render HTML markup
  • Uploading files from FreeMarker

Introduction

Users communicate with OFBiz webapps using an off-the-shelf web browser. To build a User Interface (UI) for an OFBiz webapp is to build one or more HTML web pages destined for consumption by a web browser. While OFBiz provides several mechanisms for building HTML web pages, the suggested best practice is to use the OFBiz Screen widget tool to create OFBiz "screens". This tool takes an OFBiz Screen widget configuration as input and creates HTML web pages referred to as "screens" as output.

How does OFBiz know which screen's Screen widget definition to use when building an HTML web page? By using the controller's controller.xml view-mapping(s), OFBiz translates a browser URL request to a specific screen's definition as shown:

Introduction
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.105.159