Adding id attribute with CSSBind for list
Please see the related discussion on the Google Group:
http://groups.google.com/group/liftweb/browse_thread/thread/376ae47e5075c71d/86b4690bcb01d15a#86b4690bcb01d15a
Ive just upgraded my project from 2.9.0-1/2.4-M3 ----> 2.9.1/2.4-M4 and Ive noticed one regression.
Snippet:
Template:
...should result in:
...but with 2.4-M4, it results in:
It looks like only the first li gets the "id" attribute.
Even stranger, if I change the attribute that is being added from "id" --> "idblah", it works properly.
http://groups.google.com/group/liftweb/browse_thread/thread/376ae47e5075c71d/86b4690bcb01d15a#86b4690bcb01d15a
Ive just upgraded my project from 2.9.0-1/2.4-M3 ----> 2.9.1/2.4-M4 and Ive noticed one regression.
Snippet:
def test = {
val myIdList = List("xx1", "xx2", "xx3", "x4")
".thinglist *" #>
(".thing" #> myIdList.map(t => {
".thing [id]" #> t.key
})
)
}
Template:
<ul class="thinglist lift:MySnip.test">
<li class="thing" />
</ul>
...should result in:
<ul class="thinglist">
<li class="thing" id="xx1"/>
<li class="thing" id="xx2"/>
<li class="thing" id="xx3"/>
<li class="thing" id="xx4"/>
</ul>
...but with 2.4-M4, it results in:
<ul class="thinglist">
<li class="thing" id="xx1"/>
<li class="thing "/>
<li class="thing" />
<li class="thing" />
</ul>
It looks like only the first li gets the "id" attribute.
Even stranger, if I change the attribute that is being added from "id" --> "idblah", it works properly.
Leave a comment
on 2011-09-13 15:16 *
By daviddphillips
I think this is related to #1111
on 2011-09-17 00:47 *
By peter.brant
(In revision:b415b357a1d91aa3e43c21fec51ed0a126f70dae) Allow unique transform created id attributes
When post-processing a transform created list, keep id attributes as
long as they are unique over the list.
Refs #1110
Branch: pmb-issue-1110
When post-processing a transform created list, keep id attributes as
long as they are unique over the list.
Refs #1110
Branch: pmb-issue-1110
(In revision:fafa49bd2576ec7088f45ac7c9146f7d6ee2b4b7) Allow unique transform created id attributes
When post-processing a transform created list, keep id attributes as
long as they are unique over the list.
Closes #1110
Branch: master
When post-processing a transform created list, keep id attributes as
long as they are unique over the list.
Closes #1110
Branch: master