DBRepeater is a repeater container inside which you can place data-aware components, so for each record from its DataSource it prints those components. See the workflow below to get a better idea.
You can use DBRepeater to design the way the fields from a database should be displayed for each item (row), using other data-aware components. For example, you could use labels, images, buttons, and more.
Once the design for an item is ready, associate each data-aware component to the field of the row they will use, and place them inside a DBRepeater. Then, link both the components and the DBRepeater to a common Datasource.
Then, when you run your application, each row retrieved from the database by the Datasource will be displayed using your design.
Note: For more information on how to setup the database part, check this page.
Properties, Methods and Events
- Documented in the RPCL Reference.
- There are several folders on the sample applications directory with projects where you can watch DBRepeater in action:
- Ajax\Database. Simple usage of a DBRepeater with labels.
- BlogProject. DBRepeater is used to print blog entries and user comments combining components such as Image, Label or Panel.
- ECommerceExample. DBRepeater is used to display a list of products using labels and images.
- Frames. DBRepeater is used to print a list if links using a Label.
- SimpleManagementAndJS. DBRepeater is used to print a list of product models using labels.
- ZendFramework\ZBarcode. DBRepeater is used to print a list of products, along with their barcode in thre different formats. It uses a Label for the product name, and three ZBarcode components for the barcodes, associated with the product identifier.
- ZendFramework\ZWriter. DBRepeater is used to print the entries of a news feed using several labels to display the different fields (title, author, description, etc.).