I need to create a snippet sequence that looks something like this:

<a href="next">
    <span class="name">name</span>
    <span class="comment">description</span>
    <span class="arrow"/>
</a>

The anchor needs to be generated using SHtml.link, and name &
description need to be bound.  As a result, I end up with a template
sequence like this:

<b1:link>
    <span class="name"><b2:name/></span>
    <span class="comment"><b2:description/></span>
    <span class="arrow"/>
</b1:link>

Then, I need snippet code that does something like:

bind("b1", xhtml,
  "link" -> SHtml.link(S.contextPath, () => clicked(b), bind("b2",
chooseTemplate("b1", "link", xhtml), "name" -> Text(b.name),
"description" -> Text(b.description) ))

Yuk...  I'm just not happy with this.  Sure, I could make it a little
more readable, but this still seems unnecessarily complex and
verbose.  I also really don't like how the view logic is dictating my
binding logic.  In other words, if I wanted to change my view
organization, there is a high chance that I also need to change my
binding logic -- and that just isn't right...

Is there a better strategy?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to