Issue Details (XML | Word | Printable)

Key: JAVASERVERFACES-2463
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Major Major
Assignee: Unassigned
Reporter: dougd
Votes: 0
Watchers: 0
Operations

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

f:passThroughAttribute & f:passThroughAttributes adding attributes to both parent and all children

Created: 11/Jul/12 12:44 PM   Updated: 02/Nov/12 03:56 PM   Resolved: 11/Jul/12 05:15 PM
Component/s: facelets
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Environment:

N/A


Tags:
Participants: dougd


 Description  « Hide

I am unsure if this is expected behavior or not, so I am filing this issue.

According to the TLD doc it states the following:

passThroughAttribute:
"Add an attribute to the passThroughAttributes Map of the UIComponent associated with the closest parent UIComponent tag."

Based on that I have a page that looks similar to the below.

------------------------------------ start page snippet

<h:selectOneMenu id="menu1" p:foo="bar" >

<f:selectItem id="menu1Item1"
itemLabel="foo"
itemValue="true" />
<f:selectItem id="menu1Item2"
itemLabel="bar"
itemValue="false" />

<f:passThroughAttribute name="singleatt" value="singleAtt" />
<f:passThroughAttributes value="#{Attribute.attMap}" />
</h:selectOneMenu>

------------------------------------ end page snippet

Based on the above this is what renders.

------------------------------------ start render snippet

<select id="menu1" name="menu1" singleatt="singleAtt" foo="bar" manyatttwo="manyTwo" manyattone="manyOne" manyattthree="manyThree">
<option value="true" singleatt="singleAtt" foo="bar" manyatttwo="manyTwo" manyattone="manyOne" manyattthree="manyThree">foo</option>
<option value="false" singleatt="singleAtt" foo="bar" manyatttwo="manyTwo" manyattone="manyOne" manyattthree="manyThree">bar</option>
</select>

------------------------------------ end render snippet

So based on what the TLD states I would think that the passthrough attributes being either the "p:", or the f:passThroughAttribute(s) tags usage in the above example, we should only see the passthough attributes being placed on the <select> tag and not on either of the <option> tags.



There are no comments yet on this issue.