Hi Adam,

Thanks a lot for the reply.
The reason I tried that is to actually do a check for null value.

In my code I have something like:
        value="#{a.b.c}"

As I understood from the EL documentation - if a.b is null, a.b.c should automatically resolve to null.

However in my code, if a.b is null it fails with the error:
        javax.servlet.ServletException:
        ...
        Target Unreachable, 'b' returned null
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:202)

What would be the best way to get around it?
Thanks again,

Regards,
Magdolna




From: "Adam Winer" <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: Re: Drop down list issue when using EL
Date: Tue, 9 Jan 2007 16:19:20 -0800

A value expression like #{true ? ... : ...} is not writable -
if you call ValueBinding.isReadOnly(), it returns true.
As a result, Trinidad automatically turns the
selectOneChoice to readOnly mode.

For a writable EL expression, you have to just point
at a bean property.

-- Adam


On 1/9/07, magdolna holitska <[EMAIL PROTECTED]> wrote:
Hi all,
I have a drop down list and I am trying to set the value selectively.
Whenever I use EL in the code, the drop down list disappears and instead, it
has the appearance of an output text.
Any hints?

Thank you,
Magdolna


Here is a simple example:
<tr:selectOneChoice id="ex" label="Example" value="#{true ? 'L1' : 'L2'}">
        <tr:selectItem label="L1" value="L1"/>
        <tr:selectItem label="L2" value="L2"/>
        <tr:selectItem label="L3" value="L3"/>
</tr:selectOneChoice>

_________________________________________________________________
Buy what you want when you want it on Sympatico / MSN Shopping
http://shopping.sympatico.msn.ca/content/shp/?ctId=2,ptnrid=176,ptnrdata=081805



_________________________________________________________________
Your opinion matters. Please tell us what you think and be entered into a draw for a grand prize of $500 or one of 20 $50 cash prizes. http://www.youthographyinsiders.com/R.aspx?a=116

Reply via email to