Users - Jpublish to Screens

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Users - Jpublish to Screens

oceatoon
Hi
I'm transforming our Jpublish Structure into Screens
one thing that was quite simple that now seems a bit heavy to me, if I'm not mistaken when I want to include a simple ftl into my page.

Before I'd just have to do this
${pages.get("/templates/navg1-img.ftl")}

where as now I have to
${screens.render("component://myapp/widget/CommonScreens.xml#navg1-img")}
and declare my nav1-img as a screen
<screen>....</screen>

isn't there a way to go directly to the ftl without passing through a declaration?

maybe something like this
${screens.render("/templates/navg1-img.ftl")}

Thanks for the help
Tibor


 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Jpublish to Screens

Jacopo Cappellato
Hi Tibor,

yes I think that (at the moment) this is the only way to implement 'ftl
includes'.

Jacopo

tibor katelbach wrote:

> Hi
> I'm transforming our Jpublish Structure into Screens
> one thing that was quite simple that now seems a bit heavy to me, if I'm
> not mistaken when I want to include a simple ftl into my page.
>
> Before I'd just have to do this
> ${pages.get("/templates/navg1-img.ftl")}
>
> where as now I have to
> ${screens.render("component://myapp/widget/CommonScreens.xml#navg1-img")}
> and declare my nav1-img as a screen
> <screen>....</screen>
>
> isn't there a way to go directly to the ftl without passing through a
> declaration?
>
> maybe something like this
> ${screens.render("/templates/navg1-img.ftl")}
>
> Thanks for the help
> Tibor
>
>
> ------------------------------------------------------------------------
>
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Jpublish to Screens

oceatoon
Thanks for the answer Jacopo
any idea if this will be implemented in a future release?
Thx
Tibor

On 3/13/06, Jacopo Cappellato <[hidden email]> wrote:
Hi Tibor,

yes I think that (at the moment) this is the only way to implement 'ftl
includes'.

Jacopo

tibor katelbach wrote:

> Hi
> I'm transforming our Jpublish Structure into Screens
> one thing that was quite simple that now seems a bit heavy to me, if I'm
> not mistaken when I want to include a simple ftl into my page.
>
> Before I'd just have to do this
> ${pages.get("/templates/navg1-img.ftl")}
>
> where as now I have to
> ${screens.render("component://myapp/widget/CommonScreens.xml#navg1-img")}
> and declare my nav1-img as a screen
> <screen>....</screen>
>
> isn't there a way to go directly to the ftl without passing through a
> declaration?
>
> maybe something like this
> ${screens.render("/templates/navg1-img.ftl")}
>
> Thanks for the help
> Tibor
>
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users


 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Jpublish to Screens

BJ Freeman
Just a thought. Then declaration would make it difficult to use
components in other modules.
In my stuff, I call screens in other modules, but for the most part to
use my own.

tibor katelbach sent the following on 3/13/06 3:56 AM:

> Thanks for the answer Jacopo
> any idea if this will be implemented in a future release?
> Thx
> Tibor
>
> On 3/13/06, Jacopo Cappellato <[hidden email]> wrote:
>
>>Hi Tibor,
>>
>>yes I think that (at the moment) this is the only way to implement 'ftl
>>includes'.
>>
>>Jacopo
>>
>>tibor katelbach wrote:
>>
>>>Hi
>>>I'm transforming our Jpublish Structure into Screens
>>>one thing that was quite simple that now seems a bit heavy to me, if I'm
>>>not mistaken when I want to include a simple ftl into my page.
>>>
>>>Before I'd just have to do this
>>>${pages.get("/templates/navg1-img.ftl")}
>>>
>>>where as now I have to
>>>${screens.render
>>
>>("component://myapp/widget/CommonScreens.xml#navg1-img")}
>>
>>>and declare my nav1-img as a screen
>>><screen>....</screen>
>>>
>>>isn't there a way to go directly to the ftl without passing through a
>>>declaration?
>>>
>>>maybe something like this
>>>${screens.render("/templates/navg1-img.ftl")}
>>>
>>>Thanks for the help
>>>Tibor
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>>
>>>_______________________________________________
>>>Users mailing list
>>>[hidden email]
>>>http://lists.ofbiz.org/mailman/listinfo/users
>>
>>
>>_______________________________________________
>>Users mailing list
>>[hidden email]
>>http://lists.ofbiz.org/mailman/listinfo/users
>>
>
>
>
> ------------------------------------------------------------------------
>
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Jpublish to Screens

oceatoon
This type of simple declaration made it possible and easy to distribute into templates (ftl) other sub FTLs (parts of  pages which do not need any processing, and duplicated many times).
To do this now, that same sub FTL must be declared as a screen. It doesn't ask much effort but just  seems to be unecessary declaration compared to a one line include where the ftl template is needed.

Tibor

On 3/13/06, BJ Freeman <[hidden email]> wrote:
Just a thought. Then declaration would make it difficult to use
components in other modules.
In my stuff, I call screens in other modules, but for the most part to
use my own.

tibor katelbach sent the following on 3/13/06 3:56 AM:

> Thanks for the answer Jacopo
> any idea if this will be implemented in a future release?
> Thx
> Tibor
>
> On 3/13/06, Jacopo Cappellato <[hidden email]> wrote:
>
>>Hi Tibor,
>>
>>yes I think that (at the moment) this is the only way to implement 'ftl
>>includes'.
>>
>>Jacopo
>>
>>tibor katelbach wrote:
>>
>>>Hi
>>>I'm transforming our Jpublish Structure into Screens
>>>one thing that was quite simple that now seems a bit heavy to me, if I'm
>>>not mistaken when I want to include a simple ftl into my page.
>>>
>>>Before I'd just have to do this
>>>${pages.get("/templates/navg1-img.ftl")}
>>>
>>>where as now I have to
>>>${screens.render
>>
>>("component://myapp/widget/CommonScreens.xml#navg1-img")}
>>
>>>and declare my nav1-img as a screen
>>><screen>....</screen>
>>>
>>>isn't there a way to go directly to the ftl without passing through a
>>>declaration?
>>>
>>>maybe something like this
>>>${screens.render("/templates/navg1-img.ftl")}
>>>
>>>Thanks for the help
>>>Tibor
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>>
>>>_______________________________________________
>>>Users mailing list
>>>[hidden email]
>>>http://lists.ofbiz.org/mailman/listinfo/users
>>
>>
>>_______________________________________________
>>Users mailing list
>>[hidden email]
>> http://lists.ofbiz.org/mailman/listinfo/users
>>
>
>
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users


 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Jpublish to Screens

David E. Jones
In reply to this post by Jacopo Cappellato

Tibor,

Actually this isn't quite correct. If you don't need any data preparation or other facilities in the screen widget you can always use FreeMarker's built in include mechanism (the #include directive). There is documentation about it on the freemarker.org site.

-David


Jacopo Cappellato wrote:

> Hi Tibor,
>
> yes I think that (at the moment) this is the only way to implement 'ftl
> includes'.
>
> Jacopo
>
> tibor katelbach wrote:
>> Hi
>> I'm transforming our Jpublish Structure into Screens
>> one thing that was quite simple that now seems a bit heavy to me, if I'm
>> not mistaken when I want to include a simple ftl into my page.
>>
>> Before I'd just have to do this
>> ${pages.get("/templates/navg1-img.ftl")}
>>
>> where as now I have to
>> ${screens.render("component://myapp/widget/CommonScreens.xml#navg1-img")}
>> and declare my nav1-img as a screen
>> <screen>....</screen>
>>
>> isn't there a way to go directly to the ftl without passing through a
>> declaration?
>>
>> maybe something like this
>> ${screens.render("/templates/navg1-img.ftl")}
>>
>> Thanks for the help
>> Tibor
>>
>>
>> ------------------------------------------------------------------------
>>
>>  
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.ofbiz.org/mailman/listinfo/users
>
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Jpublish to Screens

oceatoon
In reply to this post by oceatoon
Thx Chris for the advice
I'll be going with Screens,
David even submitted the solution to my initial question.
which is using Freemarker <#include method to insert snippets.
Best regards
Tibor

On 3/13/06, Firas A. <[hidden email]> wrote:
Hi Tibor,

A couple of months ago I posted a request for help with a problem very
similar to yours. I totally agree with you on your comments in this matter.

I solved my problem by editing the source code responsible for this
misbehavior. Unfortunately, I can't share my solution with you, since the
class containing this problem has undergone other, more extensive
customizations. If used, it would most likely brake some of your code
elsewhere.

But if you're intrested in a solution and don't mind toying with the source
code, here's the source of the problem:
FreeMarkerWorker.renderTemplateAtLocation()

Basicly you need to help FreeMarker find your ftls by supplying the right
template loader. You may find these resources helpful:
http://freemarker.sourceforge.net/docs/pgui_config_templateloading.html

http://freemarker.sourceforge.net/docs/pgui_misc_multithreading.html


Good luck!

</Firas>

________________________________________________________Original Message
Message: 6
Date: Mon, 13 Mar 2006 17:07:37 +0100
From: "tibor katelbach" <[hidden email]>
Subject: Re: [OFBiz] Users - Jpublish to Screens
To: "OFBiz Users / Usage Discussion" < [hidden email]>
Message-ID:
        <[hidden email]>
Content-Type: text/plain; charset="iso-8859-1"

Hi Chris

Please tell me if I understood this properly:
you say that I should do my page declaration as a combination of widgets,
widget-includes, decorators, instead of inserting bits of pages (ftl) into a
base ftl ?

I think I'm not mistaken if I say that this is probably the main difference
between jpublish and screens: there's an external construction of the page.
some things were so practical though that I wished they were still around.

It sounds like a nice idea but in practise is a lot of effort and cutting up
than the usual template engine approach. where pages are built with
combinations of includes inside the final template (JPublish). Here the
construction is external and in my use case produces more declarations than
code itself.

I'm still very new to screens but It seems at first use that SOC has been a
bit mixed up (Mixing declarations of BSH, conditions and declartion of
ftl's) .
or is this one new separation I'm just not used to yet ?
I'm interested in hearing users experience with the screen-widget compared
to the jpublish ?

Thanks for your thoughts
Regards
Tibor


_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users


 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Jpublish to Screens

oceatoon
In reply to this post by David E. Jones
Thanks David
Exactly what I was looking for.
but offcourse I should have known to look in the freemarkers lib.

Best Regards
Tibor

On 3/13/06, David E. Jones <[hidden email]> wrote:

Tibor,

Actually this isn't quite correct. If you don't need any data preparation or other facilities in the screen widget you can always use FreeMarker's built in include mechanism (the #include directive). There is documentation about it on the freemarker.org site.

-David


Jacopo Cappellato wrote:

> Hi Tibor,
>
> yes I think that (at the moment) this is the only way to implement 'ftl
> includes'.
>
> Jacopo
>
> tibor katelbach wrote:
>> Hi
>> I'm transforming our Jpublish Structure into Screens
>> one thing that was quite simple that now seems a bit heavy to me, if I'm
>> not mistaken when I want to include a simple ftl into my page.
>>
>> Before I'd just have to do this
>> ${pages.get("/templates/navg1-img.ftl")}
>>
>> where as now I have to
>> ${screens.render("component://myapp/widget/CommonScreens.xml#navg1-img")}
>> and declare my nav1-img as a screen
>> <screen>....</screen>
>>
>> isn't there a way to go directly to the ftl without passing through a
>> declaration?
>>
>> maybe something like this
>> ${screens.render("/templates/navg1-img.ftl")}
>>
>> Thanks for the help
>> Tibor
>>
>>

>> ------------------------------------------------------------------------
>>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.ofbiz.org/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users


 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users