tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vernon Wu <vern...@gatewaytech.com>
Subject "evaluating custom action attribute" Error
Date Thu, 01 Aug 2002 23:56:01 GMT

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:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message