Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion data-lift question

Received: by 10.101.197.28 with SMTP id z28mr357729anp.23.1324578123915;
        Thu, 22 Dec 2011 10:22:03 -0800 (PST)
X-BeenThere: liftweb@googlegroups.com
Received: by 10.101.4.11 with SMTP id g11ls3721683ani.2.gmail; Thu, 22 Dec
 2011 10:21:59 -0800 (PST)
Received: by 10.100.208.2 with SMTP id f2mr7051098ang.19.1324578119328;
        Thu, 22 Dec 2011 10:21:59 -0800 (PST)
Received: by 10.100.208.2 with SMTP id f2mr7051097ang.19.1324578119301;
        Thu, 22 Dec 2011 10:21:59 -0800 (PST)
Return-Path: <feeder.of.the.be...@gmail.com>
Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172])
        by gmr-mx.google.com with ESMTPS id a35si4204035yhf.2.2011.12.22.10.21.59
        (version=TLSv1/SSLv3 cipher=OTHER);
        Thu, 22 Dec 2011 10:21:59 -0800 (PST)
Received-SPF: pass (google.com: domain of feeder.of.the.be...@gmail.com designates 209.85.213.172 as permitted sender) client-ip=209.85.213.172;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of feeder.of.the.be...@gmail.com designates 209.85.213.172 as permitted sender) smtp.mail=feeder.of.the.be...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by mail-yx0-f172.google.com with SMTP id m7so5177543yen.3
        for <liftweb@googlegroups.com>; Thu, 22 Dec 2011 10:21:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type;
        bh=hnBKWCB5HgOyFdot/vr5Fpw6H7Pz5wrCU+ZMVlP0Bjo=;
        b=OiJYxwNK/gVS1QgfcBMA5gv2RTyO1DhN22VIBQVlcbBzKLhK57uEFw5okdAVVjJTIB
         hDMJHp+/vNayj+IFvzOljvF3rjfnMHQCvX4uMqri9/FnHKQoV/Y2N/CdW7vBoYOagqiR
         /Y5YPMnQZ5PFFjsOVVH4TV9epPLembFRofvvs=
MIME-Version: 1.0
Received: by 10.236.161.197 with SMTP id w45mr16538983yhk.96.1324578119209;
 Thu, 22 Dec 2011 10:21:59 -0800 (PST)
Received: by 10.147.6.37 with HTTP; Thu, 22 Dec 2011 10:21:59 -0800 (PST)
In-Reply-To: <4EF303A8.5090007@gmail.com>
References: <4EF2F4DE.70...@gmail.com>
	<m2liq5rl78....@ingolfs.dk>
	<4EF303A8.5090...@gmail.com>
Date: Thu, 22 Dec 2011 10:21:59 -0800
Message-ID: <CAH6e9Lgp1ciEO6QqUnWRQZOPrjnqzSEf9Ff+pr5xz_7QagS...@mail.gmail.com>
Subject: Re: [Lift] data-lift question
From: David Pollak <feeder.of.the.be...@gmail.com>
To: liftweb@googlegroups.com
Content-Type: multipart/alternative; boundary=20cf30563f4d45d42704b4b2605b

--20cf30563f4d45d42704b4b2605b
Content-Type: text/plain; charset=UTF-8

On Thu, Dec 22, 2011 at 2:17 AM, Peter Petersson
<petersson.pe...@gmail.com>wrote:

> On 2011-12-22 10:48, Jeppe Nejsum Madsen wrote:
>
>> Peter Petersson<petersson.peter@**gmail.com <petersson.pe...@gmail.com>>
>>  writes:
>>
>>  Hi
>>>
>>> I am in the process of switching to use data-lift="xxxx" in favor for
>>> class="lift:xxxx" and it works great.
>>> However I expected it to work on the body tag as well but I could not
>>> get it to parse, am I wrong in assuming it should work ?
>>>
>>> For instance take a look at my Basic-SquerylRecord-User-Setup example
>>> https://github.com/karma4u101/**Basic-SquerylRecord-User-**
>>> Setup/blob/master/src/main/**webapp/index.html<https://github.com/karma4u101/Basic-SquerylRecord-User-Setup/blob/master/src/main/webapp/index.html>
>>>
>>> ...here I have switched to data-lift every ware possible expect for
>>> the following:
>>>
>>> <body class="lift:content_id=main">
>>>
>>> witch I assumed I would be able to write:
>>>
>>> <body data-lift="content_id=main">
>>>
>>> but it dose not work.
>>>
>> I think the data-lift only works for snippets and the content_id is not
>> a snippet, but a special-cased marker.
>>
>> It would be nice to support not using the class attribute for anything
>> Lift related.
>>
>> Otoh, since content_id is not a snippet perhaps we should not use
>> data-lift="content_id=main" but something else like
>> data-lift-content-id="main"
>>
>> Wdyt?
>>
> Thanks for the explanation Jeppe, now that I realize it is a
> "special-cased marker" and not a snippet it makes sense.
> Yes I agree that it would be great to be able to use data-lift for
> everything lift related in the templates.
>
> Your suggestions is good, personally I think sticking with data-lift would
> be the cleanest approach from a user perspective as it would probably feel
> more natural and generate less questions on this list.
>
> How about, in addition to this "special-cased marker", add a new built in
> snippet, allowing for a alternative syntax and use it something like this
> <body data-lift="content?id=main"> ?
>

THe marker cannot be a snippet.  This stuff is evaluated before the snippet
mechanism and order is important in this case.

I like Jeppe's approach and it separates the marker into a different
attribute from the snippet stuff.  Can you or Jeppe open a ticket on this?
 I'll take it unless Jeppe feels like he wants to do the work.


>
> best regards
>   Peter Petersson
>
>
>
>> /Jeppe
>>
>>
> --
> Lift, the simply functional web framework: http://liftweb.net
> Code: http://github.com/lift
> Discussion: http://groups.google.com/**group/liftweb<http://groups.google.com/group/liftweb>
> Stuck? Help us help you: https://www.assembla.com/wiki/**
> show/liftweb/Posting_example_**code<https://www.assembla.com/wiki/show/liftweb/Posting_example_code>
>



-- 
Visi.Pro, Cloud Computing for the Rest of Us http://visi.pro
Lift, the simply functional web framework http://liftweb.net
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im

--20cf30563f4d45d42704b4b2605b
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Thu, Dec 22, 2011 at 2:17 AM, Peter P=
etersson <span dir=3D"ltr">&lt;<a href=3D"mailto:petersson.pe...@gmail.com"=
>petersson.pe...@gmail.com</a>&gt;</span> wrote:<br><blockquote class=3D"gm=
ail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-le=
ft:1ex">
<div class=3D"im">On 2011-12-22 10:48, Jeppe Nejsum Madsen wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
Peter Petersson&lt;<a href=3D"mailto:petersson.pe...@gmail.com" target=3D"_=
blank">petersson.peter@<u></u>gmail.com</a>&gt; =C2=A0writes:<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
Hi<br>
<br>
I am in the process of switching to use data-lift=3D&quot;xxxx&quot; in fav=
or for<br>
class=3D&quot;lift:xxxx&quot; and it works great.<br>
However I expected it to work on the body tag as well but I could not<br>
get it to parse, am I wrong in assuming it should work ?<br>
<br>
For instance take a look at my Basic-SquerylRecord-User-Setup example<br>
<a href=3D"https://github.com/karma4u101/Basic-SquerylRecord-User-Setup/blo=
b/master/src/main/webapp/index.html" target=3D"_blank">https://github.com/k=
arma4u101/<u></u>Basic-SquerylRecord-User-<u></u>Setup/blob/master/src/main=
/<u></u>webapp/index.html</a><br>

<br>
...here I have switched to data-lift every ware possible expect for<br>
the following:<br>
<br>
&lt;body class=3D&quot;lift:content_id=3Dmain&quot;&gt;<br>
<br>
witch I assumed I would be able to write:<br>
<br>
&lt;body data-lift=3D&quot;content_id=3Dmain&quot;&gt;<br>
<br>
but it dose not work.<br>
</blockquote>
I think the data-lift only works for snippets and the content_id is not<br>
a snippet, but a special-cased marker.<br>
<br>
It would be nice to support not using the class attribute for anything<br>
Lift related.<br>
<br>
Otoh, since content_id is not a snippet perhaps we should not use<br>
data-lift=3D&quot;content_id=3Dmain&quot; but something else like data-lift=
-content-id=3D&quot;main&quot;<br>
<br>
Wdyt?<br>
</blockquote></div>
Thanks for the explanation Jeppe, now that I realize it is a &quot;special-=
cased marker&quot; and not a snippet it makes sense.<br>
Yes I agree that it would be great to be able to use data-lift for everythi=
ng lift related in the templates.<br>
<br>
Your suggestions is good, personally I think sticking with data-lift would =
be the cleanest approach from a user perspective as it would probably feel =
more natural and generate less questions on this list.<br>
<br>
How about, in addition to this &quot;special-cased marker&quot;, add a new =
built in snippet, allowing for a alternative syntax and use it something li=
ke this &lt;body data-lift=3D&quot;content?id=3Dmain&quot;&gt; ?<br></block=
quote>
<div><br></div><div>THe marker cannot be a snippet. =C2=A0This stuff is eva=
luated before the snippet mechanism and order is important in this case.</d=
iv><div><br></div><div>I like Jeppe&#39;s approach and it separates the mar=
ker into a different attribute from the snippet stuff. =C2=A0Can you or Jep=
pe open a ticket on this? =C2=A0I&#39;ll take it unless Jeppe feels like he=
 wants to do the work.</div>
<div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
best regards<span class=3D"HOEnZb"><font color=3D"#888888"><br>
 =C2=A0 Peter Petersson</font></span><div class=3D"HOEnZb"><div class=3D"h5=
"><br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
<br>
/Jeppe<br>
<br>
</blockquote>
<br>
-- <br>
Lift, the simply functional web framework: <a href=3D"http://liftweb.net" t=
arget=3D"_blank">http://liftweb.net</a><br>
Code: <a href=3D"http://github.com/lift" target=3D"_blank">http://github.co=
m/lift</a><br>
Discussion: <a href=3D"http://groups.google.com/group/liftweb" target=3D"_b=
lank">http://groups.google.com/<u></u>group/liftweb</a><br>
Stuck? Help us help you: <a href=3D"https://www.assembla.com/wiki/show/lift=
web/Posting_example_code" target=3D"_blank">https://www.assembla.com/wiki/<=
u></u>show/liftweb/Posting_example_<u></u>code</a><br>
</div></div></blockquote></div><br><br clear=3D"all"><div><br></div>-- <br>=
<div>Visi.Pro, Cloud Computing for the Rest of Us <a href=3D"http://visi.pr=
o" target=3D"_blank">http://visi.pro</a></div>Lift, the simply functional w=
eb framework <a href=3D"http://liftweb.net" target=3D"_blank">http://liftwe=
b.net</a><div>
Follow me: <a href=3D"http://twitter.com/dpp" target=3D"_blank">http://twit=
ter.com/dpp</a><br>Blog: <a href=3D"http://goodstuff.im" target=3D"_blank">=
http://goodstuff.im</a><br></div><div><br></div><br>

--20cf30563f4d45d42704b4b2605b--