aspose file tools
The moose likes JSF and the fly likes JSTL test condition not evaluating properly? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "JSTL test condition not evaluating properly?" Watch "JSTL test condition not evaluating properly?" New topic
Author

JSTL test condition not evaluating properly?

brannan nu
Greenhorn

Joined: Dec 28, 2010
Posts: 5
im using tomcat 6 and jstl 1.2

My backing bean has a variable that looks something like this:


then the correct getters/setters.

within filesDTO i have a boolean:


now, within my jsp page i have an icefaces datatable that looks something like:


i have trimmed out a little bit but this is the main part of my problem. It always evaluates to false, even if the actual backingBean.files.active value is true.
if i do a then i get "true" so i know the value is set

if i make a boolean in my backing bean and make the getter/setters and put that in the when case, it works just fine.
anyone have any suggestions?

Thanks!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14475
    
    7

Welcome to the JavaRanch, Brannan!

JSTL does not mix well with JSF and should be avoided. There's also no need for JSTL, since JSF can do everything that JSTL could anyway except for some things that are not good MVC to begin with, like coding business logic on the web page itself.

The JSF solution to your problem is actually a lot simpler than JSTL, in any case:



Note also that JSF uses the "#" EL notation instead of the "$" in order to support both read-only and read-write references.


Customer surveys are for companies who didn't pay proper attention to begin with.
brannan nu
Greenhorn

Joined: Dec 28, 2010
Posts: 5
that worked perfectly, you sir, are awesome
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: JSTL test condition not evaluating properly?
 
Similar Threads
Struts display:column when/otherwise
DataTable and UploadFile
how to get id of many many list within ace:dialog and c:foreach
Iterate over a dataTable and delete an entry on the clicked button
Mixing JSP and Scriptlets throws compilation errors