Creating XML elements  Creating JSP elements

Chapter 4: Building Portlets

Creating database elements

An database element allows you to query a back-end database and display the results in a portlet.

StepsCreating a database element

  1. Log in to Web Studio, select Build | Portlets, and right-click in the detail view and select New Aggregated Portlet.

  2. When the Portlet Builder appears, right-click in either frame and select New Database Element from the Element Menu. You can also click the down arrow next to the Add icon and select Database Element.

  3. Complete the Database Element Definition.

    NoteThis example uses an Adaptive Server Anywhere database.

  4. Click Preview to see the query results.

  5. Click Next in the upper-right corner to display the Split window. Split columns or rows using delimiters. See “Adding split rules”.

  6. Click Next to display the Define window. Define the record layout and specify a record header. See “Defining record layout”.

  7. Click Next to display the Filter window. Specify filter rules to select only the relevant data from the element. See “Adding filter rules”.

  8. Click Next. The next page displays the element’s CGI parameters. See “CGI parameters” and “Using the database table adapter”.

  9. Click Next to display the Element Name input field.

  10. Enter a descriptive name.

  11. Click Finish to close the window and display the Portlet Builder with the new database element.

Regardless of the element type, the procedure to save the element and portlet is the same. See “Saving portlets”.

NoteSee Chapter 10, “Building Pages,” for instructions on adding portlets to pages.





Copyright © 2004. Sybase Inc. All rights reserved. Creating JSP elements

View this book as PDF