Sample JSP: Rotate Banner
& Radio Buttons |
|
This
simple JSP file builds a simple stock quote application.
It uses a rotate banner to display multiple sub-components.
The application uses a Radio-button group to control
the rotate-banner (e.g. to select one component at a
time to view). |
|
|
|
The
following JSP-code presents the above SVG-component.
The JSP code is in one file, but it is dived into sections
to explain then in parts. To inspect the SVG-code of
the AC’s, please select right mouse button and
select “View Source” in the pop-up menu. |
|
Note:
In this example, the components communicate with each
other. If you click on the Stock-quote, the component
displays next Stock-quote and notifies the Radio-button
to update the selected-button. |
|
The
JSP file to present the Above SVG-Component (Integration
Logic is highlighted in red) |
|
The
section-1 just defined few global Objects. The section-2,
includes test data, which is given in the Appendix-A.
Please review the Section-3 code to see, how one could
the Raju’s GUI-Classes in his application. |
|
The
Java-class for the Rotate Banner accepts an array of
“Component Code Generators” (e.g. CF, GUI-Objects
or plain Code-buffer In the applications, one may pass
an array CF-objects. The Rotate-banner object uses their
CGM() to get the subcomponent code. ). For the purpose
of testing, this JSP file is using the static-component-code
listed in the following Appendix-A. |
|
Appendix-A:
subcomponents.jsp |