Hi all, As Albercht had mentioned in his 1st mail---
I have a tile that shows my default input row in a form. In case that I put a value in FieldError, I want it to show it the errorMessage in red color. So far so good. The values get to the tile (formRow)... and there it's getting somewhat tricky. After reading a number of explanations, I understands that struts.apache.org <http://struts.apache.org/> recommends to use JSTL whenever possible... thus I use the c:when/c:otherwise construct like follows is it true (bold text)? I am new in Struts . Sorry by changing the topic. On 8/11/05, Troy Bull <[EMAIL PROTECTED]> wrote: > > Greg Reddin wrote: > > > On Aug 11, 2005, at 9:30 AM, Albrecht Leiprecht wrote: > > > >> Just did the following: > >> <%@ taglib uri="/WEB-INF/c.tld" prefix="c" %> > >> > >> <% > >> int errmsglength = 5; > >> %> > >> > >> > >> Further down: > >> > >> <c:if test="${errmsglength > 1}">...</c:if> > >> > >> One would expect to see the 3 dots ... but nada ... > >> And yes ...the taglib is loaded in the first line of the file ...Funky > >> ...isn't it ? > > > > > > Again, I think you're trying to access something in EL that it doesn't > > know about. EL doesn't (in my understanding) automatically obtain > > scriptlet variables. You'd have to put errmsglength in PageContext so > > EL can find it. Try this: > > > > <%@ taglib uri="/WEB-INF/c.tld" prefix="c" %> > > > > <% > > int errmsglength = 5; > > pageContext.setAttribute("errmsglength", new Integer(errmsglength)); > > %> > > > > <c:if test="${errmsglength > 1}">...</c:if> > > > > > > Greg > > or you can do something like: > > <c:set><%=variable%></c:set> > > you need to put appropriate attributes on the c:set tag of course. > > troy > > -- > The best way to get convenient parking at Berkeley is to win a Nobel > Prize. All winners are given a reserved spot on central campus. > > -- Ken > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >