-------- Original Message --------
Subject: Re: UIComponentTag.isValueReference(String) is @deprecated...
what should I use?
Date: Tue, 21 Feb 2006 11:02:46 -0800
From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Reply-To: dev_at_javaserverfaces.dev.java.net
To: dev_at_javaserverfaces.dev.java.net
References: <43F667D8.9090708_at_sun.com> <43FB5833.9080404_at_Sun.COM>
<43FB5A32.3000905_at_sun.com>
Ken Paulsen wrote:
>
> I was updating some 1.1 code to 1.2. The code takes a String which
> may or may not contain a ValueBinding (ValueExpression), if it does it
> creates a ValueBinding / ValueExpression. I call this method to
> determine if this is the case or not.
Is this tag handler code or something else?
The tag handler code, assuming you're migrating the TLD to JSP 2.1, can
leverage Expression.isLiteralText().
Can provide a more concrete example if you wish.
If you're doing something else (like passing an expression string as a
request parameter as an example), I
have a few suggestions:
1. leverage the fact that
ExpressionFactory.createValueExpression(String) will throw an
ELException if the provided String isn't syntactically correct.
I forgot to add the call to isLiteralText().
2. create your own utility method that does the same simple check
that UIComponentTag.isValueReference()
provided.
3. continue to use the deprecated method - it's probably not going
anywhere anytime soon (if
history is any indicator)
>
> Ken
>
> Ryan Lubke wrote:
>
>> Ken Paulsen wrote:
>>
>>>
>>> In JSF 1.2, UIComponentTag.isValueReference(String) is
>>> @deprecated... what should I use? I didn't see anything in
>>> javax.el.* that jumped out as the right thing to use.
>>
>> There is no direct replacement. I've spoken to the EL folks about
>> possibly adding something to the javax.el API, but it's
>> probably to late in the game to do so.
>>
>> I'm curious, what's your use case?
>>
>>>
>>> Ken
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
>>> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
>> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net