• 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

EL fails to work in data table

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to check for a condition as shown below. But the expression used in <c:when >fails to work. Note that the RCollect bean has been intialized and the result is var attribute of datatable.

TIA

Thanks,
Vikram

<jsp:useBean id="RCollect" class="org.freebxml.omar.client.ui.thin.RegistryObjectCollectionBean"
scope="session" />

<h:dataTable id="ColDataTable"
value="#{RCollect.Beans}"
var="result">
..........
........
<c:choose>
<c:when test="${result.id == RCollect.newBean.id}">
.....
......
</c:when>
</h:dataTable>
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"vikram s",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
vikram s
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bear Bibeault,

If you havent a heard a name that doesnt make it fictious. Did i say

Bear

can that be a name? no i didnt, cause i aint heard all the names in the world.

As Far as expanding Last name is concerned. I dont have one, surprised well in our part of the world many people dont. I wouldnt want to expand my middle name many would not like it? Hence just the intial to differentiate it from other Vikrams if you have any, and i am sure you have plenty.


Thanks,
Vikram
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Touche'. But check the naming rules anyway, since we did allow for single-name-only people. What we're striving for is to be professional (don't let the moth-eaten moose head fool you), and so we have a certain set of rules which have to take into account that it's a very big world. And it could be worse - so many people in China have the surname "Wang" that they've been forced to go to 3 names!

But in answer to your question: mix JSTL and JSF at your peril. That's especially true of iterative operations, but it's risky in any case. There are efforts to make the two play better together, but much remains to be done.

You may be attempting to use the wrong approach. For example, instead of a JSTL conditional wrapping of a set of buttons, here's how I handle context-sensitve button display:


JSF is more abstract than JSTL. In most cases, JSF pages should be display-oriented and logic should be handled at the backing bean level.
 
vikram s
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tim,

Thanks that helped. I made some changes to the backing bean and used the rendered attribute.

Regards,
Vikram S
reply
    Bookmark Topic Watch Topic
  • New Topic