Siebel Interactive Selling Transact Server Interface Reference > The Shopping Cart > The Quote List >

QuoteListBean Initialization

The QuoteListBean must be included in the QuoteList.jsp template just as the ShoppingCartBean does in the ShoppingCart.jsp template. There are also the familiar setSession and setRequest functions which must pass the session and request objects into the bean. The getQuoteList function gets all the quote list information from the database just as the getQuote function does in the ShoppingCartBean. But before the getQuoteList function is called, you can call some functions to specify the sorting of the list. This is exactly the same as the ConfigList. Following is the useBean statement from the QuoteList template and an explanation of each call:

<jsp:useBean id="quoteList"



The useBean statement itself is exactly like the one for ShoppingCartBean. It gives a name in the "id" parameter, which we use to refer to the QuoteListBean in the QuoteList template from now on. We used the name "quoteList" in the code snippet above. The class parameter gives the fully qualified name of the QuoteListBean class so that the JSP compiler can find the code to use for the QuoteListBean API calls.

Inside the useBean tags, we defined a code block. It is useful to have a code block in the useBean tags to put initialization statements related to the bean. This way, we know that these statements will be executed before any calls into the bean may be made.

The first statements inside the code block are calls to setSession and setRequest. The setSession call is passed the JSP session object, and the setRequest call is passed the JSP request object. You do not need to do anything to have access to the session and request objects. They are automatically made available to you in every JSP page.

The next two statements are also related in their purpose. They set the sort by field and the sort order for the quotes in the quote list. If the sort order is set to "asc," then quotes will be listed in order from least to greatest according to the value in the field specified in the setSortField call. If the sort order is set to "desc," then the quotes are ordered from greatest to least according to the value in the sort field. The sort field may be specified as one of the following:

The last call inside the code block must be made after the four calls described above. The call is getQuoteList and takes no arguments. This call retrieves all the quote list information for the current user from the database.

 Siebel Interactive Selling Transact Server Interface Reference 
 Published: 18 April 2003