• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSTL + JSF - why wont this work?

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am a JSTL newbie.

Why wont this work? (see below) The JSTL parses properly but what is rendered is not valid. I want different row classes based on a test result. I tried just the rowClasses part of the code with no success. Then I tried the whole dataTable as shown below. DOes anyone see anything wrong? I can cut and paste each option individually and it works.

<c:choose>
<c:when test="#{common.entityBean.editOrNewMode}">
<h:dataTable
rowClasses="rowClear"
styleClass="dataTable"
align="center"
var="row"
value="#{unitsList.resultList}"
columnClasses="allCols">
</c:when>
<c:otherwise>
<h:dataTable
rowClasses="rowClear,rowShaded"
styleClass="dataTable"
align="center"
var="row"
value="#{unitsList.resultList}"
columnClasses="allCols">
</c:otherwise>
</c:choose>
 
Dowell Griffin
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SOLVED:

Used pure JSF solution:

rowClasses="#{common.entityBean.editOrNewMode?'rowClear':'rowClear,rowShaded'}"
reply
    Bookmark Topic Watch Topic
  • New Topic