You said that the bean "labels" is a java.util.List.  However, you also
said "table being the String ...".  The error message, stating 'Attempt
to convert String "labels" ...' appears to concur with the last
statement (that "labels" is a String, not a List).  It sure seems like
"labels" is a String, not a List.

Also note that your "c:forEach" is putting the iterated item into
"iterateCount", but I think you meant that to be the loop counter, which
would mean you should have used "varStatus" instead of "var", and
probably change the reference to it later.

-----Original Message-----
From: Lionel PASQUIER [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 04, 2004 11:58 AM
To: [EMAIL PROTECTED]
Subject: using JSTL 1.0.5 ExpressionEvaluatorManager for custom tags


Hello,

I am willing to create custom tags that have the expression evaluation
of the JSTL 1.0.5. I am using tomcat 4, JDK1.4, thus cannot switch to
JSTL1.1 .

I found the
org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager
class that seems to be pretty cool. So I made my tags use it, but
without success. In my case I have a tag like: <c:forEach begin="${0}"
end="${labelssize - 1}" var="iteratecount">
        <mytags:selectitem table="${labels}" index="${iteratecount}"
item="item"> </c:forEach>

where the bean "labels" contains a java.util.List . 
selectitem is supposed to return in the bean named "item" the Object at
index ${iteratecount} of labels.

So in the java code I put:
Object object = ExpressionUtil.evalNotNull("SelectItem", "table", table,
List.class, this, pageContext); *table being the String set by parameter
table of cours*

which, unfortunatly returns an error:
"An error occurred while evaluating custom action attribute "table" with
value "labels": Attempt to convert String "labels" to type
"java.util.List", but there is no PropertyEditor for that type (null) "

Isn't ExpressionUtil.evalNotNull not supposed to returned the Object
found behind the bean of resulting parsed String?

Maybe the
org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager is
not supposed to be used for custom tags? Is there a howto about this?

I have also another question, but this might not be the best mailing
list to ask this: I am using taglibs with tomcat and struts. But I have
a lot of logs that never show up anywhere :p (such as the taglib is not
found, throws an error, or struts does not find the action, etc...).
Could you suggest me a link or two to help me figure out how to
configure the stuff correctly?

Sorry if these questions have been asked many times already, but I could
not find a suitable google answer...

Lionel

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to