Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Most OFBiz URLs follow that pattern. The first part after the server name selects the webapp which is supposed to process this request. In this case, the request is for the partymgr webapp. The next part, control, determines that this request should be processed by the Controller Servlet. (See the mapping in web.xml in each webapp.) The Controller Servlet uses the control.xml file in the webapp's WEB-INF folder to decide what content to serve in response to this request.

Panel

Hint: If you wanted to integrate any functionality into OFBiz which you don't want to base on the Controller Servlet, you can use any URL namespace expect control and map it to your custom servlet.


Rendering Screens



How the Controller Servlet handles a request

...

The type of response is a view (type="view") with name name of "main" (value="main"). Don't get confused by the view name being identical to the URI part that the request-map matched. This is just by chance in this case. The view could be named anything, as long as there will be a view-map element with that name.

Panel

Note: A view is not the only possible response to a request. We will discuss other potential responses later in this document. Right now, we're up to understanding how an HTML screen is rendered in a webapp in response to an HTTP(S) request.


Element: view-map

  •  Attributes: name, type, page

...

The control servlet will now pass on the processing to the specified view handler by calling the xyz method using the a, b and c as parameters. It's entirely up to the implementation of the view handler to generate the response and write it to the servlet response channel.

Panel

Hint: So if you wanted to implement a view handler which is not based on the OFBiz widgets toolkit but using whatever other view technology, as long as it's a servlet based technology, you would have to implement your own ViewHandler class and make it known to the controller servlet by adding a handler element to the controller.xml file. Then you could create one or more view-map elements with the type="yournewhandler" and have any response in a request-map dispatch processing to that view.



Anatomy of a screen definition

to be written

What to display: Data Binding