To my understanding, in the following example
<jsp:useBean id="customer" type="sample.Customer" scope="request"/> ...
Customer Name: <%=customer.getName()%>
...
<% if (customer.getState().equals("CO")){ %>
...
<%}%>
is equalised to:
Customer Name: ${ customer. name}
<c:if test="${customer. state == param. state}">
...
</c:if>
Where the "name" is not essential to be an attribute of the Customer class as long as
the class has a method called
"getName".
I see some examples from PetStore 1.3.1. In the product.jsp, for example,
<jsp:useBean
id="catalog"
class="com.sun.j2ee.blueprints.catalog.client.CatalogHelper"
scope="session"
/>
....
<c:set value="${catalog.items}" var="pageResults" />
There is not an attribute named "items", but a method "getItems" in the class
CatalogHelper.
But when I use ${agentHelper.blocks} where the "blocks" is not an attribute, I get an
error message as:
An error occurred while evaluating custom action attribute "value" with value
"${agentHelper.blocks}": An error
occurred while getting property "blocks" from an instance of class ....
This error message indicates that "blocks" has to be an attribute of the class.
But how it works in the PS1.3.1?
Thanks for your information.
Vernon
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>