Oops that code should be: htmlText="Posted in <a href='event:{some_variable}'>{some_variable}</a>"
On Wed, May 27, 2009 at 10:47 PM, dorkie dork from dorktown < dorkiedorkfromdorkt...@gmail.com> wrote: > Good idea. I was creating a tutorial so I was trying to put it all in one > mxml file. I'll make a note of it. If someone is reading this and has to do > it like the code above you would just need to convert the less than > character like so: > > htmlText="Posted in <a > href='event:{postsrepeater.currentitem.categories.catego...@name}'</a>" > > Thanks Tracy > > > n Wed, May 27, 2009 at 10:39 PM, Tracy Spratt <tr...@nts3rd.com> wrote: > >> >> >> Ugh, instead of that horrid, unreadable, un-debuggable code, create a >> custom component, pass in currentItem, and code that component normally. To >> use htmltext in mxml, you will have to use CData or use entity references >> for the special chars. Instead, build the html string in an AS function. >> You will actually be able to debug it. >> >> >> >> Tracy Spratt, >> >> Lariat Services, development services available >> ------------------------------ >> >> *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On >> Behalf Of *dorkie dork from dorktown >> *Sent:* Wednesday, May 27, 2009 11:25 PM >> *To:* flexcoders@yahoogroups.com >> *Subject:* [flexcoders]Databinding in htmlText in repeater puzzle >> >> >> >> >> >> >> If I have this code inside a htmlText field inside a Repeater: >> >> <mx:Text id="postFooter1" width="100%" y="0" >> htmlText="Posted in {postsrepeater.currentitem.categories.catego...@name} >> | {postsrepeater.currentit...@commentcount} Comments " /> >> >> How can I wrap it in anchor tags? >> >> <mx:Text id="postFooter1" width="100%" y="0" >> htmlText="Posted in <a >> href='event:{postsrepeater.currentitem.categories.catego...@name >> }'>{postsrepeater.currentitem.categories.catego...@name}</a> | <a >> href='event:{postsrepeater.currentit...@commentcount >> }'>{postsrepeater.currentit...@commentcount} Comments</a> " /> >> >> If I use the above code the compiler says: >> >> The value of attribute "htmlText" must not contain the '<' character. >> >> > >