BBJSP Widget Overview (Deprecated)
The BBJSP system is deprecated. For new development, use BBxServlet.
Description
In BBj 16.0 and higher, the BBJSP framework provides widgets that can be injected into a BBJSP Page. Consider a Widget as being similar to a Java Bean as it provides data through the BBjspPageContext that can be used in your pages.
Implementing your widget
Every BBJSP Widget must be implemented as a custom class as in the example below, implementing the following method.
METHOD PUBLIC void open(<a href="../BBjspPageContext/bbjsppagecontext.html">BBjspPageContext</a> context!)
Include the BBJSP Widget in your Page
To use a BBJSP Widget within a page or a custom tag you should first include the widget into the page with the <bbj:widget/> tag as follows:
<bbj:widget id='product' source="widgets/Product.bbj" class='ProductWidget' />
When the page is executed, the wiget's open(BBjspPageContext context!) method will be called to initialize the widget for use. All public fields will be available in the BBJSP Expression Language.
Remarks
This is a simple widget with fields that are available to the BBJSP Expression Language including a BBjVector containing string entries.
Example
|
This example demonstrates how this works in a BBJSP web-page
<%@ taglib uri='/WEB-CFG/tld/core.tld' prefix='c' %> |