Beruflich Dokumente
Kultur Dokumente
Database Access
User Interaction
BSP Extensions
Attributes
Methods
Events
Layout Method
<%@page language="javascript"%>
• is similar to Active Server Pages <html>
<body>
(Microsoft) or Java Server Pages <center>
<% for(i=0;i<5;i++) { %>
<font size=<%=i%>>
• is accessible via URL like common Hello World! <br>
</font>
pages of a web server <% } %>
</center>
</body>
</html>
Database Access
User Interaction
BSP Extensions
BSP Application
Application Class
Attributes
Methods
An Instance of the Application Class is
created at every Request to the page
(stateless) and is available in all events
and in the Layout
Database Access
User Interaction
BSP Extensions
<HTML><BODY>
HTTP
HTTPPOST
GET
BSP <% loop
do ...
<tr>
at it %>
end do. %>
<td><%=it-a%></td>
<bsp:button ...>
Runtime <td><%=it-b%></td>
<form >
Response Layout </tr>
<% endloop. %>
rendering of the page <form
processing the scripting method=“secd.htm“>
<input type=submit
code value=“OnHugo“>
</form>
Runtime
determines
BSP App
© 2004 SEAL - All rights reserved
and Page
Business Server Pages, Anupam Jaiswal
Where to do the Input Processing?
Adress.htm Order.htm
Problem with such direct navigation:
• User input from page X must be ... ...
Layout
...
<form method="post">
<input type=text name= "carrier" value="">
<input type=submit name="OnInputProcessing" value="Search">
</form>
...
Layout
...
<form method="post">
<input type=text name= "carrier" value="">
<input type=submit name="OnInputProcessing(select)" value="Search">
<input type=submit name="OnInputProcessing(exit)" value="Exit">
</form> more then one submit
... button can be
distinguished by an
arbitrary event name that
case event_id. Input Processing
InputProcessing is available as EVENT_ID
in the Input Processing
when 'select'.
data: carr TYPE string.
carr = request->get_form_field( 'carrier' ).
navigation->set_parameter( name = ‘sel_carr'
value = carr ).
navigation->goto_page('flights.htm' ).
when 'exit'.
navigation->exit( exit_url='http://www.sap.com' ).
endcase.
Case event_id.
Input Processing When ‘submit‘.
...
event handling When ‚‘exit‘.
retrieval of user input Navigation->...
Initialization
Layout Rendering
Input Processing
Database Access
User Interaction
BSP Extensions
Sort
...
Reusable rendering
Browser-independent
<table> <htmlb:tableView
id ="table"
...75 lines of HTML table ="<%=FLIGHTS%>"
...tons of javaScript rowCount ="15"
headerVisible="true"
...some scripting design
</table> ="ALTERNATING" />
BSP Extension
HTML
Element
© 2004 SEAL - All rights reserved
Business Server Pages, Anupam Jaiswal
BSP Extensions – Tag Libraries
Tag Libraries
• well known from JSP
• user definded Tags linked
with Program coding that
generates at runtime the
HTTP response
• predefined UI elements
(TableView, TreeView,
InputFields,...)
• browser independent
<tabStrip> You can use this BSP element to switch between different views that use the same screen area.
<checkBox> You can use this BSP element to implement an on/off switch.
<listBox> This BSP element is similar to the classical GUI concept of a selection list with multiple selection (list box).
<tableView> This BSP element is used to display mass data in a layout similar to a table (table view).
<fileUpload> This BSP element is used for uploading a file to the server.
<image> This BSP element is used as a view element and contains a MIME object, such as an image or a symbol.
<form> This BSP element is used for rendering a form, whereby the functionality rests on the HTML tag form.
Database Access
User Interaction
BSP Extensions
BSP page
Request
events
<form ...>
<input
application->
...>
</form>
Response
Application Class
Attributes
Methods
HandleEvents
Handle Events
Updateapplication
Update applicationdata
data
Request Define
Definecontrol
controlflow
flow
Controller
Model
Defines
Definesapplication
applicationdata
data
Usually
Usuallyconnected
connectedtoto
business
businessfunctionality
functionality
Response
View
Visualization
Visualizationof
ofthe
the
application
applicationdata
data
BSP Controller
Request
METHOD
DO_REQUEST
...
CALL_VIEW
Application Class
Attributes
Methods
BSP View
Response <form ...>
<input
...>
</form>
tray Tray
week Week
© 2004 SEAL - All rights reserved
Business Server Pages, Anupam Jaiswal