This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JSF and the fly likes EL fails to work in data table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "EL fails to work in data table" Watch "EL fails to work in data table" New topic
Author

EL fails to work in data table

vikram s
Greenhorn

Joined: Dec 30, 2004
Posts: 9
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>
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61316
    
  66

"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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
vikram s
Greenhorn

Joined: Dec 30, 2004
Posts: 9
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
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16103
    
  21

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.


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

Joined: Dec 30, 2004
Posts: 9
Hi Tim,

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

Regards,
Vikram S
 
GeeCON Prague 2014
 
subject: EL fails to work in data table