Issue Details (XML | Word | Printable)

Key: TRINIDAD-381
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Adam Winer
Reporter: Adam Winer
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
MyFaces Trinidad

JSF 1.2: EL binding to null Strings show up as empty strings

Created: 09/Feb/07 02:22 AM   Updated: 09/Aug/07 04:45 AM
Component/s: None
Affects Version/s: 2.0.0-incubating-core-SNAPSHOT
Fix Version/s: 2.0.0-incubating-core-SNAPSHOT

Time Tracking:
Not Specified

Resolution Date: 09/Feb/07 02:47 AM


 Description  « Hide
Take:

        <tr:outputText value="foo" styleClass="#{notthere}" shortDesc="#{nowway}"/>

Prior to 1.2, this generated no "class" or "title" attribute, because these EL
bindings return null.

Now, in 1.2, these being strings, we tell the JSP system that these are deferred-values
of type java.lang.String. And, the silly coercion rules then convert every null to
"".

So, we get:

   <span title="" class="">foo</span>

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Adam Winer added a comment - 09/Feb/07 02:47 AM
Fixed. We no longer use
  <deferred-value>
     <type>java.lang.String</type>
  </deferred-value>

It's just:

  <deferred-value/>

This means that we have to handle coercion in our own code, but
we were doing this already because of 1.1.

Bruno Aranda added a comment - 28/Apr/07 11:44 AM
For MyFaces 1.2 TLD compliance we really need to be able to have things like

<deferred-value>
     <type>java.lang.String</type>
  </deferred-value>

(for instance, the dataTable "var" attribute)

As well as other deferred value types, such as javax.faces.component.UIComponent.

So for MyFaces, this is a must