wood burning stoves
The moose likes JSF and the fly likes ValueExpressiion isLiteralText() confusion? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "ValueExpressiion isLiteralText() confusion?" Watch "ValueExpressiion isLiteralText() confusion?" New topic

ValueExpressiion isLiteralText() confusion?

Prash Singh
Ranch Hand

Joined: Aug 23, 2009
Posts: 103

Dear All,

I am trying to develop a custom component of my own.
I am trying to set the component tag attributes using ValueExpression.

I am a bit confused about the ValueExpression is behaving.

There is a method isLiteralText()
which states

This method must return true if and only if the expression string this expression was created from contained no unescaped EL delimeters (${...} or #{...}).

and getExpressionString() which returns the string which formed the ValueExpression for that attribute.

The confusion is
when I check

value.isLiteralText() it reurns true.
but when I call value.getExpressionString()
it returns #{testBean.dateField} , so in this case value.isLteralText() must return false, but is not happening.

Please help me with this issue.
Prash Singh
Ranch Hand

Joined: Aug 23, 2009
Posts: 103

Hello everybody. Please reply to this thread..
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

We prefer that people don't "bump" threads. The Ranch forums are active enough that if you don't get an answer within a few days, probably nobody else knows the answer, either.

But it can take a couple of days in any event. Since we're not being paid to do this, people show up when it's convenient for them - no one is standing by 24x7.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link: http://aspose.com/file-tools
subject: ValueExpressiion isLiteralText() confusion?
It's not a secret anymore!