[web-devel] [Yesod] Bookmarklet web app development.

Ian Duncan iand675 at gmail.com
Sun Feb 20 21:25:05 CET 2011


renderJulius is indeed what you want.

renderJulius takes a route rendering function for the first argument and then a quasiquoted Julius expression. Unfortunately there's not an explanation exactly how renderJulius's first argument works, but it's definitely related to how it renders routes. 
Perhaps Michael can give us an intuition on that.

#{} interpolated stuff works without any special effort.

Once it's clear how to use the first argument, you should be able to just write out the data either to a temporary file and give that to your user or just embed the rendered javascript in a link on a page and have the user drag it to their toolbar.
-- 
Ian Duncan

On Sunday, February 20, 2011 at 6:08 AM, William Pearson wrote:
> On 20 February 2011 05:22, Ian Duncan <iand675 at gmail.com> wrote:
> > William,
> > It sounds like you should be able to do what you want to do. You can render
> > type-safe urls with Julius using @{type-safe-url} escapes and other stuff
> > using #{whatever} escapes. No need to sacrifice there. Is that what you were
> > asking? I'm not quite clear on what your dilemma is.
> 
> The problem is creating a function of type a -> Handler (Content,
> ContentType) where Content is not a static javascript file, but
> created from a Julius or Cassius template.
> 
> addJulius is not what I want because it returns a GWidget which I need
> to add to a defaultLayout or something. Which even if I had a blank
> default layout as a subsite would put it in script tags, I think.
> 
> renderJulius looks like what I want but I haven't found examples of it's use.
> 
> Does that make things clearer?
> 
>  Will
> 
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20110220/a96a6db1/attachment.htm>


More information about the web-devel mailing list