EnterpriseItem bean

See Also  

This managed bean is the source for a single Crystal Enterprise object such as a report, folder, or program. This bean provides information and adds functionality to the UI components.

To learn more about core Crystal Enterprise functionality and application development, consult the Crystal Enterprise Java SDK Guide.

Click the appropriate link to jump to that section:

Overview

The EnterpriseItem bean is the source for a Crystal Enterprise object, and is used to represent an object on the page. An EnterpriseItem bean is a key aspect of any application built with JavaServer Faces Components for Crystal Enterprise. Many components, such as ReportPageViewer component, depend on the EnterpriseItem bean because their function is to operate on a Crystal Enterprise object. For example, the purpose of the ReportPageViewer component is to view, specifically, a report object. To retrieve a Crystal Enterprise object from the system, the object must be queried for by the page using the Crystal Enterprise query language. The EnterpriseItem bean, however, reduces this complexity down to a set of properties that generate a query string automatically. Set the properties to desired values to retrieve the object of interest. For more information on the Crystal Enterprise query language, see the Crystal Enterprise Java SDK Guide.

The itemID property is central to making the relationship between the EnterpriseItem bean and the actual object, as it specifies the ID or CUID of the object represented by the EnterpriseItem bean. For example, you may set this property to the report ID of a report the user selected in one of your pages. This EnterpriseItem bean could then be bound to a ReportPageViewer component to render and display that report to the user. The itemID property can be set many different ways. A common scenario would be to set the itemID property programmatically after the user selects a single item from a list of items in the page. In this case, you would have actually queried for a collection of items represented by an EnterpriseItems bean, displayed the collection of items represented by the EnterpriseItems bean using a component such as the ItemsGrid component, and then passed in the single ID of the item selected by the user into an EnterpriseItem bean. For more information, see EnterpriseItems bean. How you set the itemID property for an EnterpriseItem bean in the page depends heavily on the scenario you are trying to implement.

The fields property defines the database fields you want to query for, which determines which object properties and property bags are retrieved with the object. Select which fields are returned with the object so that the EnterpriseItem bean has access to the information you require. Examples of valid strings include:

Your EnterpriseItem bean will be able to access and manipulate the object's fields based on the selections you make for this fields property. So, for example, "All" would return all fields, whereas {"SI_NAME, SI_DESCRIPTION, SI_PROGID"} would return only three specific fields, including the title, description, and ProgID of the item.

Note:    For more information on Crystal Enterprise ProgIDs, see the Crystal Enterprise Java SDK Guide.

Note:    For a comprehensive reference of all EnterpriseItem bean members, see the IEnterpriseItem interface in the JavaServer Faces Components for Crystal Enterprise Java API Reference.

Example faces-config.xml declaration

<managed-bean>

    <description>Source for a single report.</description>

    <managed-bean-name>report</managed-bean-name>

    <managed-bean-class>

        com.businessobjects.jsf.appcontrols.model.EnterpriseItem

    </managed-bean-class>

    <managed-bean-scope>session</managed-bean-scope>

    <managed-property>

        <property-name>itemID</property-name>

        <value>0</value>

    </managed-property>

</managed-bean>



Business Objects
http://www.businessobjects.com/
Support services
http://www.businessobjects.com/services/support/