I have some markup that I would like to put in a separate file, but I
can't seem to get this to work with CSS transformations without using
eager_eval=true on the surrounding snippet
This is the template:
<lift:MySnippet eager_eval=true">
<div id="post">
<lift:embed what="/fragments/import_results"></lift:embed>
....
</div>
<div id="get">...</div>
...
</lift:MySnippet>
The embedded fragment:
<div>
Result: <span class="result">the result</span>
Filename: <span class="file_name">the filename</span>
</div>
Snippet:
"#post ^*" #> "dummy" &
".result" #> "foo" &
".file_name" #> "bar"
Right now,
1) I have to remember to add eager_eval to every use of MySnippet and
2) It evaluates more than is necessary since I always select part of
the snippet body.
It would be nice to only eagerly evaluate contents of the #post div.
Is this possible? Is it a useful feature?
/Jeppe
Hi
I have some markup that I would like to put in a separate file, but I
can't seem to get this to work with CSS transformations without using
eager_eval=true on the surrounding snippet
This is the template:
<lift:MySnippet eager_eval=true">
<div id="post">
<lift:embed what="/fragments/import_results"></lift:embed>
....
</div>
<div id="get">...</div>
...
</lift:MySnippet>
The embedded fragment:
<div>
Result: <span class="result">the result</span>
Filename: <span class="file_name">the filename</span>
</div>
Snippet:
"#post ^*" #> "dummy" &
".result" #> "foo" &
".file_name" #> "bar"
Right now,
1) I have to remember to add eager_eval to every use of MySnippet and
2) It evaluates more than is necessary since I always select part of
the snippet body.
It would be nice to only eagerly evaluate contents of the #post div.
Is this possible? Is it a useful feature?
/Jeppe
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
You seem to be pushing a lot for me lately, thanks :-)
/Jeppe
/Jeppe
>
>>
>> Right now,
>>
>> 1) I have to remember to add eager_eval to every use of MySnippet and
>> 2) It evaluates more than is necessary since I always select part of
>> the snippet body.
>>
>> It would be nice to only eagerly evaluate contents of the #post div.
>> Is this possible? Is it a useful feature?
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Just tried this and I can't seem to make it work with the "^*" selector
I haven't fully grokked the wizardry behind the Css selectors, but
"#post ^*" #> "dummy" & (S.eagerEval andThen ".result" #> "foo" &
".file_name" #> "bar")
doesn't work since eagerEval is a NodeSeq=>NodeSeq and not a CssSel
/Jeppe
/Jeppe
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Thanks again. I actually tried that but had my snippet return a
CssBindFunc (to catch any problems with conversions). The above turns
the result into a NodeSeq=>NodeSeq (which of course is fine for a
snippet). A little tricky to figure out when & where the implicit
conversions kick in....
/Jeppe