Message from discussion
Surround with not working when using ChooseTemplate for mobile
Received: by 10.43.46.137 with SMTP id uo9mr10347432icb.18.1350512909776;
Wed, 17 Oct 2012 15:28:29 -0700 (PDT)
X-BeenThere: liftweb@googlegroups.com
Received: by 10.42.244.193 with SMTP id lr1ls17346289icb.1.gmail; Wed, 17 Oct
2012 15:28:24 -0700 (PDT)
Received: by 10.43.8.201 with SMTP id ot9mr10301461icb.10.1350512904031;
Wed, 17 Oct 2012 15:28:24 -0700 (PDT)
Received: by 10.43.8.201 with SMTP id ot9mr10301460icb.10.1350512903981;
Wed, 17 Oct 2012 15:28:23 -0700 (PDT)
Return-Path: <feeder.of.the.be...@gmail.com>
Received: from mail-oa0-f44.google.com (mail-oa0-f44.google.com [209.85.219.44])
by gmr-mx.google.com with ESMTPS id s9si2026907igw.0.2012.10.17.15.28.23
(version=TLSv1/SSLv3 cipher=OTHER);
Wed, 17 Oct 2012 15:28:23 -0700 (PDT)
Received-SPF: pass (google.com: domain of feeder.of.the.be...@gmail.com designates 209.85.219.44 as permitted sender) client-ip=209.85.219.44;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of feeder.of.the.be...@gmail.com designates 209.85.219.44 as permitted sender) smtp.mail=feeder.of.the.be...@gmail.com; dkim=pass header...@gmail.com
Received: by mail-oa0-f44.google.com with SMTP id n5so10897750oag.17
for <liftweb@googlegroups.com>; Wed, 17 Oct 2012 15:28:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=yM5gfxLLbadXNZnn4wSnFdZXqJ71ezOxneVmKpAyDec=;
b=0s8MvdPUmKQ4iTCQqHYxu/2xQk/Oe0gcGzg75FaeWjZX7cCKVYGJSsXvgw28pRZ42J
YMjzdWUbkJRRXtKKH9HPdgtw8o3wWQ2R7kRZ970g1YXHfjrQevt2vf8+GddOsXx+wUp0
G4BmLuaQ3HrXXzbfHMGnCfckA1dh7253+P9NV6LDC7Pm0BkRNSaS657m0Q7liJyxAeuQ
bU6d84IXzlS7gJYuokTkn1jLrJLVMDklYu1jbsT20Tl6r9KpdVAbWQg+/pbpYoKzgHpX
9JQknxc9YUDd+b/qHM50fTMNuK3hFrEOmFSN+6MbtxZDQ/WIUd1QZaEjIHVrInHRTBUU
lYgg==
MIME-Version: 1.0
Received: by 10.60.170.44 with SMTP id aj12mr9296292oec.3.1350512903549; Wed,
17 Oct 2012 15:28:23 -0700 (PDT)
Received: by 10.76.90.8 with HTTP; Wed, 17 Oct 2012 15:28:23 -0700 (PDT)
In-Reply-To: <CAE-RkXjdautxhv4y6_zevRbANvpExp-+BCV_sXrn0r1Er5K...@mail.gmail.com>
References: <3c42f07b-9f9f-48de-b364-cb87209a9e12@googlegroups.com>
<CAE-RkXi5O0vPnyK+fkZ5WJdcK4bANe-8taVM0-_=DTK8zbi...@mail.gmail.com>
<8e3be796-2cc7-40fa-a118-2a7115920e85@googlegroups.com>
<CAE-RkXgeLB-uHFQAvNihxB2vmGMgh1j0wge8neV8rpN6Ew5...@mail.gmail.com>
<76bc4c04-7099-4350-8a52-e8e93f726c88@googlegroups.com>
<17D10F49-9DBC-41DD-8834-90D8CFEA0...@agynamix.de>
<ce1e2be7-9731-4921-a203-90b7f5b50381@googlegroups.com>
<CAE-RkXhu8kavPNgDA-UMJs-rx6+j8YvdYZvu9bg6scY+sLS...@mail.gmail.com>
<b97cb436-8c45-49ce-9f62-a03c86304192@googlegroups.com>
<CAE-RkXj4Ga-fCrw9KV6J4=MREAVEV0-AyX8aR6shZm_Y5b=...@mail.gmail.com>
<CAE-RkXj1WjDjyJ+NLy=2vOG_47=VY_JDMu=8oSHjOOCL-Eb...@mail.gmail.com>
<4CADBB7E-DD92-4D70-8637-B4A716013...@agynamix.de>
<CAE-RkXj9Nzt6Gw+Su+dBWbPBn70HHor7i8GV4W74Vbe9+q2...@mail.gmail.com>
<CAOdJzyRkLw_QUYFUcXhNZBzCKcm3Ck6VjD28cAZ0wyU9HH_...@mail.gmail.com>
<CAE-RkXjdautxhv4y6_zevRbANvpExp-+BCV_sXrn0r1Er5K...@mail.gmail.com>
Date: Wed, 17 Oct 2012 15:28:23 -0700
Message-ID: <CAH6e9LjH99AwzJ7p4hsodg9qU6K8CPcrMo2gCNga-EYejxu...@mail.gmail.com>
Subject: Re: [Lift] Surround with not working when using ChooseTemplate for mobile
From: David Pollak <feeder.of.the.be...@gmail.com>
To: liftweb@googlegroups.com
Content-Type: multipart/alternative; boundary=bcaec54d475ce1713a04cc48c931
--bcaec54d475ce1713a04cc48c931
Content-Type: text/plain; charset=UTF-8
The surround snippet eagerly evaluates the thing being surrounded before
putting it inside the template. That way, stuff like messages, etc. get
displayed correctly.
On Wed, Oct 17, 2012 at 3:12 PM, Diego Medina <di...@fmpwizard.com> wrote:
> On Wed, Oct 17, 2012 at 5:38 PM, Peter Petersson
> <petersson.pe...@gmail.com> wrote:
> > A question still reminds in my head, why did not eager_eval work ? I am
> on
> > my cell and have not looked at the code but I think both you and Torsten
> was
> > right on track when you suggested it.
> >
>
> a wild guess is that the surround snippet works differently than a
> regular snippet, but I haven;t had the chance to look any further.
>
> Diego
>
>
> > --from my cell
> > best regards Peter Peterson
> >
> > Den 10 okt 2012 13:04 skrev "Diego Medina" <di...@fmpwizard.com>:
> >
> >> Thanks
> >>
> >> Diego
> >> Sent from my android cell
> >>
> >> On Oct 10, 2012 3:09 AM, "AGYNAMIX Torsten Uhlmann"
> >> <T.Uhlm...@agynamix.de> wrote:
> >>>
> >>> Clever.
> >>>
> >>> --
> >>> AGYNAMIX(R). Passionate Software.
> >>> Inh. Torsten Uhlmann | Buchenweg 5 | 09380 Thalheim
> >>> Phone: +49 3721 273445
> >>> Fax: +49 3721 273446
> >>> Mobile: +49 151 12412427
> >>> Web: http://www.agynamix.de
> >>>
> >>> Am 10.10.2012 um 06:49 schrieb Diego Medina <di...@fmpwizard.com>:
> >>>
> >>> ok, so I could not get eager_eval to do what I wanted, so I ended up
> >>> with a different solution
> >>>
> >>>
> >>>
> https://github.com/fmpwizard/lift_25_sbt/commit/40383f9add27082c59ec656d964dc03d19a41602
> >>>
> >>> Hope that helps.
> >>>
> >>> Diego
> >>>
> >>> On Tue, Oct 9, 2012 at 7:56 PM, Diego Medina <di...@fmpwizard.com>
> wrote:
> >>>
> >>> Ah, ok, I'll try again tonight then :)
> >>>
> >>> Diego
> >>>
> >>> On Tue, Oct 9, 2012 at 7:01 PM, Kevin <ke...@infofinity.com> wrote:
> >>>
> >>> Hi Diego, That's the problem. If you remove eager_eval=true, then you
> >>> won't
> >>> see a blank screen, but the "content" div will not be updated with the
> >>> actual page contents (although the correct template embed is chosen
> based
> >>> on
> >>> mobile=true).
> >>>
> >>> The basic problem is that I would like to select a template based on
> some
> >>> boolean logic to test whether a request is coming from a mobile phone
> or
> >>> not. I had used David's example of a snippet that chooses the correct
> >>> embed
> >>> and I'm unable to make it work with any combination of eager_eval.
> >>> However,
> >>> if there's an alternative way to do this, that is just as good.
> >>>
> >>> Thanks.
> >>>
> >>>
> >>> On Monday, October 8, 2012 2:03:31 PM UTC-7, fmpwizard wrote:
> >>>
> >>>
> >>> ok, I pulled the latest from your branch,
> >>>
> >>> I go to http://127.0.0.1:8080/index?mobile=true and the page is just
> >>> blank, is this what you see too? can you get even a regular snippet
> >>> working?
> >>>
> >>> I guess having detail steps on what we should do to see what you see,
> >>> and details on what you see, but expect to see would help.
> >>>
> >>> Thanks
> >>>
> >>> Diego
> >>>
> >>> On Mon, Oct 8, 2012 at 3:12 PM, Kevin <ke...@infofinity.com> wrote:
> >>>
> >>> Hi Torsten, I had just tested eager_eval=true and it didn't work but I
> >>> didn't commit eager_eval=true. The change is committed now with:
> >>>
> >>>
> >>> <div class="lift:ChooseTemplate?eager_eval=true">
> >>> <div id="normal" class="lift:embed?what=normal_template"></div>
> >>> <div id="mobile" class="lift:embed?what=mobile_template"></div>
> >>> </div>
> >>>
> >>> On Sunday, October 7, 2012 11:52:44 PM UTC-7, Torsten Uhlmann wrote:
> >>>
> >>>
> >>> Hi Kevin,
> >>>
> >>> in the code I nowhere see an eager_eval, did you miss it?
> >>>
> >>> In the Lift source (SnippetSpec) it is embedded like this:
> >>>
> >>> <div class="l:foo?eager_eval=true">a<lift:foo>b</lift:foo></div>
> >>>
> >>> Kind Regards,
> >>> Torsten.
> >>>
> >>> --
> >>> AGYNAMIX(R). Passionate Software.
> >>> Inh. Torsten Uhlmann | Buchenweg 5 | 09380 Thalheim
> >>> Phone: +49 3721 273445
> >>> Fax: +49 3721 273446
> >>> Mobile: +49 151 12412427
> >>> Web: http://www.agynamix.de
> >>>
> >>> Am 08.10.2012 um 06:10 schrieb Kevin <ke...@infofinity.com>:
> >>>
> >>> Hey Diego, thanks very much for taking a look! The reproduced problem
> >>> is
> >>> in the lift_blank project here:
> >>>
> >>> git clone git://github.com/kevg/lift_25_sbt.git
> >>>
> >>> The diff for the changes I made are here:
> >>>
> >>>
> >>>
> https://github.com/kevg/lift_25_sbt/commit/c8803daf95c6e007409de672e1dcb5231d97177a
> >>>
> >>> On Sunday, October 7, 2012 7:57:07 PM UTC-7, fmpwizard wrote:
> >>>
> >>>
> >>> Thanks Torsten,
> >>>
> >>> @Kevin: This is very strange, could you put together a sample app
> >>> showing
> >>> this?
> >>> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
> >>>
> >>> I have used eager_eval before to solve this issue, so I hope it is not
> >>> broken.
> >>>
> >>> Thanks
> >>>
> >>> Diego
> >>>
> >>>
> >>> On Sun, Oct 7, 2012 at 10:14 PM, Kevin <ke...@infofinity.com> wrote:
> >>>
> >>> Hi Diego, Torsten, I tried adding eager_eval=true on both the outer
> >>> snippet
> >>> and the embed tags, and neither worked:
> >>>
> >>> <div class="lift:ChooseTemplate?eager_eval=true">
> >>> <div id="normal"
> >>> class="lift:embed?what=normal_template"></div>
> >>>
> >>> <div id="mobile"
> >>> class="lift:embed?what=mobile_template"></div>
> >>> </div>
> >>>
> >>> <div class="lift:ChooseTemplate">
> >>> <div id="normal"
> >>> class="lift:embed?what=normal_template;eager_eval=true"></div>
> >>> <div id="mobile"
> >>> class="lift:embed?what=mobile_template;eager_eval=true"></div>
> >>> </div>
> >>>
> >>> <div class="lift:ChooseTemplate?eager_eval=true">
> >>> <div id="normal"
> >>> class="lift:embed?what=normal_template;eager_eval=true"></div>
> >>> <div id="mobile"
> >>> class="lift:embed?what=mobile_template;eager_eval=true"></div>
> >>> </div>
> >>>
> >>>
> >>>
> >>> On Sunday, October 7, 2012 11:51:57 AM UTC-7, fmpwizard wrote:
> >>>
> >>>
> >>> Could you try using eager=true ? I'm on my cell and i can't
> >>> remember
> >>> if
> >>> it goes on the outer snippet or the inner.
> >>>
> >>> Regards
> >>>
> >>> Diego
> >>>
> >>> Diego
> >>> Sent from my android cell
> >>>
> >>> On Oct 6, 2012 3:17 PM, "Kevin" <ke...@infofinity.com> wrote:
> >>>
> >>>
> >>> Hi there, I've created a fork of lift_25_sbt to show a problem I'm
> >>> having
> >>> where I use a snippet to choose either a normal template or a
> >>> mobile
> >>> phone
> >>> template. The snippet is working, but the content is not being
> >>> replace by
> >>> pages with a surround.
> >>>
> >>> Here is the fork: https://github.com/kevg/lift_25_sbt
> >>>
> >>> And here is the diff:
> >>>
> >>>
> >>>
> >>>
> https://github.com/kevg/lift_25_sbt/commit/c8803daf95c6e007409de672e1dcb5231d97177a
> >>>
> >>> I changed the default template to be the ChooseTemplate based on
> >>> David's
> >>> suggestion:
> >>> https://groups.google.com/d/msg/liftweb/g1Co9wvvbBM/mpZymarR06AJ
> >>>
> >>> <div class="lift:ChooseTemplate">
> >>> <div id"normal" class="lift:embed?what=normal_template"></div>
> >>> <div id="mobile" class="lift:embed?what=mobile_template"></div>
> >>> </div>
> >>>
> >>> When I run the code, I get "The main content will get bound here"
> >>> instead
> >>> of the content of the page. Any thoughts?
> >>>
> >>> Thanks,
> >>> Kevin
> >>>
> >>> --
> >>> --
> >>> Lift, the simply functional web framework: http://liftweb.net
> >>> Code: http://github.com/lift
> >>> Discussion: http://groups.google.com/group/liftweb
> >>> Stuck? Help us help you:
> >>> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> --
> >>> Lift, the simply functional web framework: http://liftweb.net
> >>> Code: http://github.com/lift
> >>> Discussion: http://groups.google.com/group/liftweb
> >>> Stuck? Help us help you:
> >>> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> Diego Medina
> >>> Lift/Scala Developer
> >>> di...@fmpwizard.com
> >>> http://www.fmpwizard.com
> >>>
> >>>
> >>>
> >>> --
> >>> --
> >>> Lift, the simply functional web framework: http://liftweb.net
> >>> Code: http://github.com/lift
> >>> Discussion: http://groups.google.com/group/liftweb
> >>> Stuck? Help us help you:
> >>> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> --
> >>> Lift, the simply functional web framework: http://liftweb.net
> >>> Code: http://github.com/lift
> >>> Discussion: http://groups.google.com/group/liftweb
> >>> Stuck? Help us help you:
> >>> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> Diego Medina
> >>> Lift/Scala Developer
> >>> di...@fmpwizard.com
> >>> http://www.fmpwizard.com
> >>>
> >>>
> >>> --
> >>> --
> >>> Lift, the simply functional web framework: http://liftweb.net
> >>> Code: http://github.com/lift
> >>> Discussion: http://groups.google.com/group/liftweb
> >>> Stuck? Help us help you:
> >>> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> Diego Medina
> >>> Lift/Scala Developer
> >>> di...@fmpwizard.com
> >>> http://www.fmpwizard.com
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> Diego Medina
> >>> Lift/Scala Developer
> >>> di...@fmpwizard.com
> >>> http://www.fmpwizard.com
> >>>
> >>> --
> >>> --
> >>> Lift, the simply functional web framework: http://liftweb.net
> >>> Code: http://github.com/lift
> >>> Discussion: http://groups.google.com/group/liftweb
> >>> Stuck? Help us help you:
> >>> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> --
> >>> Lift, the simply functional web framework: http://liftweb.net
> >>> Code: http://github.com/lift
> >>> Discussion: http://groups.google.com/group/liftweb
> >>> Stuck? Help us help you:
> >>> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
> >>>
> >>>
> >>>
> >>
> >> --
> >> --
> >> Lift, the simply functional web framework: http://liftweb.net
> >> Code: http://github.com/lift
> >> Discussion: http://groups.google.com/group/liftweb
> >> Stuck? Help us help you:
> >> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
> >>
> >>
> >>
> >
> > --
> > --
> > Lift, the simply functional web framework: http://liftweb.net
> > Code: http://github.com/lift
> > Discussion: http://groups.google.com/group/liftweb
> > Stuck? Help us help you:
> > https://www.assembla.com/wiki/show/liftweb/Posting_example_code
> >
> >
> >
>
>
>
> --
> Diego Medina
> Lift/Scala Developer
> di...@fmpwizard.com
> http://www.fmpwizard.com
>
> --
> --
> Lift, the simply functional web framework: http://liftweb.net
> Code: http://github.com/lift
> Discussion: http://groups.google.com/group/liftweb
> Stuck? Help us help you:
> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
>
>
>
>
--
Telegram, Simply Beautiful CMS https://telegr.am
Lift, the simply functional web framework http://liftweb.net
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im
--bcaec54d475ce1713a04cc48c931
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
The surround snippet eagerly evaluates the thing being surrounded before pu=
tting it inside the template. That way, stuff like messages, etc. get displ=
ayed correctly.<br><br><div class=3D"gmail_quote">On Wed, Oct 17, 2012 at 3=
:12 PM, Diego Medina <span dir=3D"ltr"><<a href=3D"mailto:diego@fmpwizar=
d.com" target=3D"_blank">di...@fmpwizard.com</a>></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div class=3D"im">On Wed, Oct 17, 2012 at 5:=
38 PM, Peter Petersson<br>
<<a href=3D"mailto:petersson.pe...@gmail.com">petersson.pe...@gmail.com<=
/a>> wrote:<br>
> A question still reminds in my head, why did not =C2=A0eager_eval work=
? I am on<br>
> my cell and have not looked at the code but I think both you and Torst=
en was<br>
> right on track when you suggested it.<br>
><br>
<br>
</div>a wild guess is that the surround snippet works differently than a<br=
>
regular snippet, but I haven;t had the chance to look any further.<br>
<span class=3D"HOEnZb"><font color=3D"#888888"><br>
=C2=A0 Diego<br>
</font></span><div class=3D"HOEnZb"><div class=3D"h5"><br>
<br>
> --from my cell<br>
> best regards Peter Peterson<br>
><br>
> Den 10 okt 2012 13:04 skrev "Diego Medina" <<a href=3D"ma=
ilto:di...@fmpwizard.com">di...@fmpwizard.com</a>>:<br>
><br>
>> Thanks<br>
>><br>
>> Diego<br>
>> Sent from my android cell<br>
>><br>
>> On Oct 10, 2012 3:09 AM, "AGYNAMIX Torsten Uhlmann"<br>
>> <<a href=3D"mailto:T.Uhlm...@agynamix.de">T.Uhlm...@agynamix.de=
</a>> wrote:<br>
>>><br>
>>> Clever.<br>
>>><br>
>>> --<br>
>>> AGYNAMIX(R). Passionate Software.<br>
>>> Inh. Torsten Uhlmann | Buchenweg 5 | 09380 Thalheim<br>
>>> Phone: =C2=A0 =C2=A0 =C2=A0 <a href=3D"tel:%2B49%203721%202734=
45" value=3D"+493721273445">+49 3721 273445</a><br>
>>> Fax: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"tel:=
%2B49%203721%20273446" value=3D"+493721273446">+49 3721 273446</a><br>
>>> Mobile: =C2=A0 =C2=A0 =C2=A0 <a href=3D"tel:%2B49%20151%201241=
2427" value=3D"+4915112412427">+49 151 12412427</a><br>
>>> Web: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"http://www.=
agynamix.de" target=3D"_blank">http://www.agynamix.de</a><br>
>>><br>
>>> Am 10.10.2012 um 06:49 schrieb Diego Medina <<a href=3D"mai=
lto:di...@fmpwizard.com">di...@fmpwizard.com</a>>:<br>
>>><br>
>>> ok, so I could not get eager_eval to do what I wanted, so I en=
ded up<br>
>>> with a different solution<br>
>>><br>
>>><br>
>>> <a href=3D"https://github.com/fmpwizard/lift_25_sbt/commit/403=
83f9add27082c59ec656d964dc03d19a41602" target=3D"_blank">https://github.com=
/fmpwizard/lift_25_sbt/commit/40383f9add27082c59ec656d964dc03d19a41602</a><=
br>
>>><br>
>>> Hope that helps.<br>
>>><br>
>>> =C2=A0Diego<br>
>>><br>
>>> On Tue, Oct 9, 2012 at 7:56 PM, Diego Medina <<a href=3D"ma=
ilto:di...@fmpwizard.com">di...@fmpwizard.com</a>> wrote:<br>
>>><br>
>>> Ah, ok, I'll try again tonight then :)<br>
>>><br>
>>> =C2=A0Diego<br>
>>><br>
>>> On Tue, Oct 9, 2012 at 7:01 PM, Kevin <<a href=3D"mailto:ke=
v...@infofinity.com">ke...@infofinity.com</a>> wrote:<br>
>>><br>
>>> Hi Diego, That's the problem. If you remove eager_eval=3Dt=
rue, then you<br>
>>> won't<br>
>>> see a blank screen, but the "content" div will not b=
e updated with the<br>
>>> actual page contents (although the correct template embed is c=
hosen based<br>
>>> on<br>
>>> mobile=3Dtrue).<br>
>>><br>
>>> The basic problem is that I would like to select a template ba=
sed on some<br>
>>> boolean logic to test whether a request is coming from a mobil=
e phone or<br>
>>> not. I had used David's example of a snippet that chooses =
the correct<br>
>>> embed<br>
>>> and I'm unable to make it work with any combination of eag=
er_eval.<br>
>>> However,<br>
>>> if there's an alternative way to do this, that is just as =
good.<br>
>>><br>
>>> Thanks.<br>
>>><br>
>>><br>
>>> On Monday, October 8, 2012 2:03:31 PM UTC-7, fmpwizard wrote:<=
br>
>>><br>
>>><br>
>>> ok, I pulled the latest from your branch,<br>
>>><br>
>>> I go to <a href=3D"http://127.0.0.1:8080/index?mobile=3Dtrue" =
target=3D"_blank">http://127.0.0.1:8080/index?mobile=3Dtrue</a> and the pag=
e is just<br>
>>> blank, is this what you see too? can you get even a regular sn=
ippet<br>
>>> working?<br>
>>><br>
>>> I guess having detail steps on what we should do to see what y=
ou see,<br>
>>> and details on what you see, but expect to see would help.<br>
>>><br>
>>> Thanks<br>
>>><br>
>>> =C2=A0Diego<br>
>>><br>
>>> On Mon, Oct 8, 2012 at 3:12 PM, Kevin <<a href=3D"mailto:ke=
....@infofinity.com">ke...@infofinity.com</a>> wrote:<br>
>>><br>
>>> Hi Torsten, I had just tested eager_eval=3Dtrue and it didn=
9;t work but I<br>
>>> didn't commit eager_eval=3Dtrue. The change is committed n=
ow with:<br>
>>><br>
>>><br>
>>> =C2=A0 =C2=A0<div class=3D"lift:ChooseTemplate?eager_e=
val=3Dtrue"><br>
>>> =C2=A0 =C2=A0 =C2=A0 <div id=3D"normal" class=3D&=
quot;lift:embed?what=3Dnormal_template"></div><br>
>>> =C2=A0 =C2=A0 =C2=A0 <div id=3D"mobile" class=3D&=
quot;lift:embed?what=3Dmobile_template"></div><br>
>>> =C2=A0 =C2=A0 </div><br>
>>><br>
>>> On Sunday, October 7, 2012 11:52:44 PM UTC-7, Torsten Uhlmann =
wrote:<br>
>>><br>
>>><br>
>>> Hi Kevin,<br>
>>><br>
>>> in the code I nowhere see an eager_eval, did you miss it?<br>
>>><br>
>>> In the Lift source (SnippetSpec) it is embedded like this:<br>
>>><br>
>>> <div class=3D"l:foo?eager_eval=3Dtrue">a<li=
ft:foo>b</lift:foo></div><br>
>>><br>
>>> Kind Regards,<br>
>>> Torsten.<br>
>>><br>
>>> --<br>
>>> AGYNAMIX(R). Passionate Software.<br>
>>> Inh. Torsten Uhlmann | Buchenweg 5 | 09380 Thalheim<br>
>>> Phone: =C2=A0 =C2=A0 =C2=A0 <a href=3D"tel:%2B49%203721%202734=
45" value=3D"+493721273445">+49 3721 273445</a><br>
>>> Fax: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"tel:=
%2B49%203721%20273446" value=3D"+493721273446">+49 3721 273446</a><br>
>>> Mobile: =C2=A0 =C2=A0 =C2=A0 <a href=3D"tel:%2B49%20151%201241=
2427" value=3D"+4915112412427">+49 151 12412427</a><br>
>>> Web: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"http://www.=
agynamix.de" target=3D"_blank">http://www.agynamix.de</a><br>
>>><br>
>>> Am 08.10.2012 um 06:10 schrieb Kevin <<a href=3D"mailto:ke.=
....@infofinity.com">ke...@infofinity.com</a>>:<br>
>>><br>
>>> Hey Diego, thanks very much for taking a look! The reproduced =
problem<br>
>>> is<br>
>>> in the lift_blank project here:<br>
>>><br>
>>> git clone git://<a href=3D"http://github.com/kevg/lift_25_sbt.=
git" target=3D"_blank">github.com/kevg/lift_25_sbt.git</a><br>
>>><br>
>>> The diff for the changes I made are here:<br>
>>><br>
>>><br>
>>> <a href=3D"https://github.com/kevg/lift_25_sbt/commit/c8803daf=
95c6e007409de672e1dcb5231d97177a" target=3D"_blank">https://github.com/kevg=
/lift_25_sbt/commit/c8803daf95c6e007409de672e1dcb5231d97177a</a><br>
>>><br>
>>> On Sunday, October 7, 2012 7:57:07 PM UTC-7, fmpwizard wrote:<=
br>
>>><br>
>>><br>
>>> Thanks Torsten,<br>
>>><br>
>>> @Kevin: This is very strange, could you put together a sample =
app<br>
>>> showing<br>
>>> this?<br>
>>> <a href=3D"https://www.assembla.com/wiki/show/liftweb/Posting_=
example_code" target=3D"_blank">https://www.assembla.com/wiki/show/liftweb/=
Posting_example_code</a><br>
>>><br>
>>> I have used eager_eval before to solve this issue, so I hope i=
t is not<br>
>>> broken.<br>
>>><br>
>>> Thanks<br>
>>><br>
>>> =C2=A0Diego<br>
>>><br>
>>><br>
>>> On Sun, Oct 7, 2012 at 10:14 PM, Kevin <<a href=3D"mailto:k=
e...@infofinity.com">ke...@infofinity.com</a>> wrote:<br>
>>><br>
>>> Hi Diego, Torsten, I tried adding eager_eval=3Dtrue on both th=
e outer<br>
>>> snippet<br>
>>> and the embed tags, and neither worked:<br>
>>><br>
>>> =C2=A0 =C2=A0<div class=3D"lift:ChooseTemplate?eager_e=
val=3Dtrue"><br>
>>> =C2=A0 =C2=A0 =C2=A0<div id=3D"normal"<br>
>>> class=3D"lift:embed?what=3Dnormal_template"></=
div><br>
>>><br>
>>> =C2=A0 =C2=A0 =C2=A0<div id=3D"mobile"<br>
>>> class=3D"lift:embed?what=3Dmobile_template"></=
div><br>
>>> =C2=A0 =C2=A0</div><br>
>>><br>
>>> =C2=A0 =C2=A0<div class=3D"lift:ChooseTemplate"&g=
t;<br>
>>> =C2=A0 =C2=A0 =C2=A0<div id=3D"normal"<br>
>>> class=3D"lift:embed?what=3Dnormal_template;eager_eval=3Dt=
rue"></div><br>
>>> =C2=A0 =C2=A0 =C2=A0<div id=3D"mobile"<br>
>>> class=3D"lift:embed?what=3Dmobile_template;eager_eval=3Dt=
rue"></div><br>
>>> =C2=A0 =C2=A0</div><br>
>>><br>
>>> =C2=A0 =C2=A0<div class=3D"lift:ChooseTemplate?eager_e=
val=3Dtrue"><br>
>>> =C2=A0 =C2=A0 =C2=A0<div id=3D"normal"<br>
>>> class=3D"lift:embed?what=3Dnormal_template;eager_eval=3Dt=
rue"></div><br>
>>> =C2=A0 =C2=A0 =C2=A0<div id=3D"mobile"<br>
>>> class=3D"lift:embed?what=3Dmobile_template;eager_eval=3Dt=
rue"></div><br>
>>> =C2=A0 =C2=A0</div><br>
>>><br>
>>><br>
>>><br>
>>> On Sunday, October 7, 2012 11:51:57 AM UTC-7, fmpwizard wrote:=
<br>
>>><br>
>>><br>
>>> Could you try using eager=3Dtrue =C2=A0? I'm on my cell an=
d i can't<br>
>>> remember<br>
>>> if<br>
>>> it goes on the outer snippet or the inner.<br>
>>><br>
>>> Regards<br>
>>><br>
>>> Diego<br>
>>><br>
>>> Diego<br>
>>> Sent from my android cell<br>
>>><br>
>>> On Oct 6, 2012 3:17 PM, "Kevin" <<a href=3D"mailt=
o:ke...@infofinity.com">ke...@infofinity.com</a>> wrote:<br>
>>><br>
>>><br>
>>> Hi there, I've created a fork of lift_25_sbt to show a pro=
blem I'm<br>
>>> having<br>
>>> where I use a snippet to choose either a normal template or a<=
br>
>>> mobile<br>
>>> phone<br>
>>> template. The snippet is working, but the content is not being=
<br>
>>> replace by<br>
>>> pages with a surround.<br>
>>><br>
>>> Here is the fork: <a href=3D"https://github.com/kevg/lift_25_s=
bt" target=3D"_blank">https://github.com/kevg/lift_25_sbt</a><br>
>>><br>
>>> And here is the diff:<br>
>>><br>
>>><br>
>>><br>
>>> <a href=3D"https://github.com/kevg/lift_25_sbt/commit/c8803daf=
95c6e007409de672e1dcb5231d97177a" target=3D"_blank">https://github.com/kevg=
/lift_25_sbt/commit/c8803daf95c6e007409de672e1dcb5231d97177a</a><br>
>>><br>
>>> I changed the default template to be the ChooseTemplate based =
on<br>
>>> David's<br>
>>> suggestion:<br>
>>> <a href=3D"https://groups.google.com/d/msg/liftweb/g1Co9wvvbBM=
/mpZymarR06AJ" target=3D"_blank">https://groups.google.com/d/msg/liftweb/g1=
Co9wvvbBM/mpZymarR06AJ</a><br>
>>><br>
>>> <div class=3D"lift:ChooseTemplate"><br>
>>> =C2=A0<div id"normal" class=3D"lift:embed?wh=
at=3Dnormal_template"></div><br>
>>> =C2=A0<div id=3D"mobile" class=3D"lift:embed=
?what=3Dmobile_template"></div><br>
>>> </div><br>
>>><br>
>>> When I run the code, I get "The main content will get bou=
nd here"<br>
>>> instead<br>
>>> of the content of the page. Any thoughts?<br>
>>><br>
>>> Thanks,<br>
>>> Kevin<br>
>>><br>
>>> --<br>
>>> --<br>
>>> Lift, the simply functional web framework: <a href=3D"http://l=
iftweb.net" target=3D"_blank">http://liftweb.net</a><br>
>>> Code: <a href=3D"http://github.com/lift" target=3D"_blank">htt=
p://github.com/lift</a><br>
>>> Discussion: <a href=3D"http://groups.google.com/group/liftweb"=
target=3D"_blank">http://groups.google.com/group/liftweb</a><br>
>>> Stuck? Help us help you:<br>
>>> <a href=3D"https://www.assembla.com/wiki/show/liftweb/Posting_=
example_code" target=3D"_blank">https://www.assembla.com/wiki/show/liftweb/=
Posting_example_code</a><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> --<br>
>>> Lift, the simply functional web framework: <a href=3D"http://l=
iftweb.net" target=3D"_blank">http://liftweb.net</a><br>
>>> Code: <a href=3D"http://github.com/lift" target=3D"_blank">htt=
p://github.com/lift</a><br>
>>> Discussion: <a href=3D"http://groups.google.com/group/liftweb"=
target=3D"_blank">http://groups.google.com/group/liftweb</a><br>
>>> Stuck? Help us help you:<br>
>>> <a href=3D"https://www.assembla.com/wiki/show/liftweb/Posting_=
example_code" target=3D"_blank">https://www.assembla.com/wiki/show/liftweb/=
Posting_example_code</a><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Diego Medina<br>
>>> Lift/Scala Developer<br>
>>> <a href=3D"mailto:di...@fmpwizard.com">di...@fmpwizard.com</a>=
<br>
>>> <a href=3D"http://www.fmpwizard.com" target=3D"_blank">http://=
www.fmpwizard.com</a><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> --<br>
>>> Lift, the simply functional web framework: <a href=3D"http://l=
iftweb.net" target=3D"_blank">http://liftweb.net</a><br>
>>> Code: <a href=3D"http://github.com/lift" target=3D"_blank">htt=
p://github.com/lift</a><br>
>>> Discussion: <a href=3D"http://groups.google.com/group/liftweb"=
target=3D"_blank">http://groups.google.com/group/liftweb</a><br>
>>> Stuck? Help us help you:<br>
>>> <a href=3D"https://www.assembla.com/wiki/show/liftweb/Posting_=
example_code" target=3D"_blank">https://www.assembla.com/wiki/show/liftweb/=
Posting_example_code</a><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> --<br>
>>> Lift, the simply functional web framework: <a href=3D"http://l=
iftweb.net" target=3D"_blank">http://liftweb.net</a><br>
>>> Code: <a href=3D"http://github.com/lift" target=3D"_blank">htt=
p://github.com/lift</a><br>
>>> Discussion: <a href=3D"http://groups.google.com/group/liftweb"=
target=3D"_blank">http://groups.google.com/group/liftweb</a><br>
>>> Stuck? Help us help you:<br>
>>> <a href=3D"https://www.assembla.com/wiki/show/liftweb/Posting_=
example_code" target=3D"_blank">https://www.assembla.com/wiki/show/liftweb/=
Posting_example_code</a><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Diego Medina<br>
>>> Lift/Scala Developer<br>
>>> <a href=3D"mailto:di...@fmpwizard.com">di...@fmpwizard.com</a>=
<br>
>>> <a href=3D"http://www.fmpwizard.com" target=3D"_blank">http://=
www.fmpwizard.com</a><br>
>>><br>
>>><br>
>>> --<br>
>>> --<br>
>>> Lift, the simply functional web framework: <a href=3D"http://l=
iftweb.net" target=3D"_blank">http://liftweb.net</a><br>
>>> Code: <a href=3D"http://github.com/lift" target=3D"_blank">htt=
p://github.com/lift</a><br>
>>> Discussion: <a href=3D"http://groups.google.com/group/liftweb"=
target=3D"_blank">http://groups.google.com/group/liftweb</a><br>
>>> Stuck? Help us help you:<br>
>>> <a href=3D"https://www.assembla.com/wiki/show/liftweb/Posting_=
example_code" target=3D"_blank">https://www.assembla.com/wiki/show/liftweb/=
Posting_example_code</a><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Diego Medina<br>
>>> Lift/Scala Developer<br>
>>> <a href=3D"mailto:di...@fmpwizard.com">di...@fmpwizard.com</a>=
<br>
>>> <a href=3D"http://www.fmpwizard.com" target=3D"_blank">http://=
www.fmpwizard.com</a><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Diego Medina<br>
>>> Lift/Scala Developer<br>
>>> <a href=3D"mailto:di...@fmpwizard.com">di...@fmpwizard.com</a>=
<br>
>>> <a href=3D"http://www.fmpwizard.com" target=3D"_blank">http://=
www.fmpwizard.com</a><br>
>>><br>
>>> --<br>
>>> --<br>
>>> Lift, the simply functional web framework: <a href=3D"http://l=
iftweb.net" target=3D"_blank">http://liftweb.net</a><br>
>>> Code: <a href=3D"http://github.com/lift" target=3D"_blank">htt=
p://github.com/lift</a><br>
>>> Discussion: <a href=3D"http://groups.google.com/group/liftweb"=
target=3D"_blank">http://groups.google.com/group/liftweb</a><br>
>>> Stuck? Help us help you:<br>
>>> <a href=3D"https://www.assembla.com/wiki/show/liftweb/Posting_=
example_code" target=3D"_blank">https://www.assembla.com/wiki/show/liftweb/=
Posting_example_code</a><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> --<br>
>>> Lift, the simply functional web framework: <a href=3D"http://l=
iftweb.net" target=3D"_blank">http://liftweb.net</a><br>
>>> Code: <a href=3D"http://github.com/lift" target=3D"_blank">htt=
p://github.com/lift</a><br>
>>> Discussion: <a href=3D"http://groups.google.com/group/liftweb"=
target=3D"_blank">http://groups.google.com/group/liftweb</a><br>
>>> Stuck? Help us help you:<br>
>>> <a href=3D"https://www.assembla.com/wiki/show/liftweb/Posting_=
example_code" target=3D"_blank">https://www.assembla.com/wiki/show/liftweb/=
Posting_example_code</a><br>
>>><br>
>>><br>
>>><br>
>><br>
>> --<br>
>> --<br>
>> Lift, the simply functional web framework: <a href=3D"http://liftw=
eb.net" target=3D"_blank">http://liftweb.net</a><br>
>> Code: <a href=3D"http://github.com/lift" target=3D"_blank">http://=
github.com/lift</a><br>
>> Discussion: <a href=3D"http://groups.google.com/group/liftweb" tar=
get=3D"_blank">http://groups.google.com/group/liftweb</a><br>
>> Stuck? Help us help you:<br>
>> <a href=3D"https://www.assembla.com/wiki/show/liftweb/Posting_exam=
ple_code" target=3D"_blank">https://www.assembla.com/wiki/show/liftweb/Post=
ing_example_code</a><br>
>><br>
>><br>
>><br>
><br>
> --<br>
> --<br>
> Lift, the simply functional web framework: <a href=3D"http://liftweb.n=
et" target=3D"_blank">http://liftweb.net</a><br>
> Code: <a href=3D"http://github.com/lift" target=3D"_blank">http://gith=
ub.com/lift</a><br>
> Discussion: <a href=3D"http://groups.google.com/group/liftweb" target=
=3D"_blank">http://groups.google.com/group/liftweb</a><br>
> Stuck? Help us help you:<br>
> <a href=3D"https://www.assembla.com/wiki/show/liftweb/Posting_example_=
code" target=3D"_blank">https://www.assembla.com/wiki/show/liftweb/Posting_=
example_code</a><br>
><br>
><br>
><br>
<br>
<br>
<br>
--<br>
Diego Medina<br>
Lift/Scala Developer<br>
<a href=3D"mailto:di...@fmpwizard.com">di...@fmpwizard.com</a><br>
<a href=3D"http://www.fmpwizard.com" target=3D"_blank">http://www.fmpwizard=
.com</a><br>
<br>
--<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/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/s=
how/liftweb/Posting_example_code</a><br>
<br>
<br>
<br>
</div></div></blockquote></div><br><br clear=3D"all"><div><br></div>-- <br>=
<div>Telegram, Simply Beautiful CMS <a href=3D"https://telegr.am" target=3D=
"_blank">https://telegr.am</a></div>Lift, the simply functional web framewo=
rk <a href=3D"http://liftweb.net" target=3D"_blank">http://liftweb.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>
--bcaec54d475ce1713a04cc48c931--