Thanks Karr.

Well it works now, but I am not too sure about what I did wrong or right :/



> -----Message d'origine-----
> De : Karr, David [mailto:[EMAIL PROTECTED]
> Envoyé : vendredi 5 mars 2004 15:41
> À : Tag Libraries Users List
> Objet : RE: using JSTL 1.0.5 ExpressionEvaluatorManager for 
> custom tags
> 
> 
> I'm not sure what is wrong.  I used ExpressionEvaluatorManager (not
> ExpressionUtil) to write Struts-EL, so you could inspect that code to
> look for examples.
> 
> Ask about enabling aspects of Struts logging in struts-user.  It uses
> commons-logging, so you should be able to set up a logging.properties
> file with a higher debug level than the default.
> 
> -----Original Message-----
> From: Lionel PASQUIER [mailto:[EMAIL PROTECTED] 
> Sent: Friday, March 05, 2004 1:21 AM
> To: Tag Libraries Users List
> Subject: RE: using JSTL 1.0.5 ExpressionEvaluatorManager for 
> custom tags
> 
> 
> Hello Karr,
> 
> > You said that the bean "labels" is a java.util.List.
> > However, you also
> > said "table being the String ...".  The error message, 
> 
> Well, I should have been more precise:
> the table String is actually "${labels}", or at least I believe it is:
> it is the String set by setTable(String) corresponding to the 
> parameter
> "table" of the "selectitem" tag: <mytags:selectitem table="${labels}"
> index="${iteratecount}" item="item">
> 
> So I thought that ${labels} should expand through
> ExpressionUtil.evalNotNull into the List behind the bean 
> "labels". Am I
> wrong?
> 
> 
> > 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
> 
> yes indeed I was talking about the counter, not the item. 
> Since foreach
> has only begin and end parameter, it seems it stores an 
> Integer in var.
> Well at least this part works in my tests. 
> My  real problem is about the expand of ${labels} that leads to the
> error I stated previously.
> 
> PS: any idea about my log problem? maybe I should ask that in another
> mail...
> 
> 
> Lionel
> 
> 
> 
> > -----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]
> > 
> > 
> 
> ---------------------------------------------------------------------
> 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]
> 
> 

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

Reply via email to