|
Hello all,
Is there any way to include jsp page into widgets? For example: <section> <condition> <if-empty field-name="queryResult"/> </condition> <widgets> <container> ### include jsp page here </container> </widgets> </section> Thanks, _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
|
if you find an example that has FTL files it should work for JSP as well.
Oleg Kozyrev Jr. sent the following on 3/26/06 1:56 AM: > Hello all, > > Is there any way to include jsp page into widgets? > For example: > <section> > <condition> > <if-empty field-name="queryResult"/> > </condition> > <widgets> > <container> > ### include jsp page here > </container> > </widgets> > </section> > > Thanks, > > _______________________________________________ > Dev mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/dev > _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
|
Actually, no, it is not possible to include JSPs in a screen widget. Because of the way the JSP specification is written it cannot produce String, Writer, or even interrupted Stream output, not without doing something that is implementation specific (ie one class for doing it for each JSP engine you work with). This is one of the many reasons we prefer using a tool like FTL which is a general templating tool and can produce more flexible output. For more details on why JSP won't work in this sort of circumstance there are many general commentaries and good documentation and such about it. This is all outside of OFBiz of course. There is some discussion and information in the mailing list archives as well here, but I don't think I'd recommend that route for finding this sort of info. -David BJ Freeman wrote: > if you find an example that has FTL files it should work for JSP as well. > > Oleg Kozyrev Jr. sent the following on 3/26/06 1:56 AM: >> Hello all, >> >> Is there any way to include jsp page into widgets? >> For example: >> <section> >> <condition> >> <if-empty field-name="queryResult"/> >> </condition> >> <widgets> >> <container> >> ### include jsp page here >> </container> >> </widgets> >> </section> >> >> Thanks, >> >> _______________________________________________ >> Dev mailing list >> [hidden email] >> http://lists.ofbiz.org/mailman/listinfo/dev >> > > _______________________________________________ > Dev mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/dev _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
|
David, BJ thanks.
And does it mean that the only way to use some jsp tag library is creating screens with regions tool, like in webtools? Like this: <define id="main" region="MAIN_REGION"> <put section="title">Main Page</put> <put section="content" content="/main.jsp" /> </define> Thanks again. Oleg. -----Original Message----- From: "David E. Jones" <[hidden email]> To: OFBiz Project Development Discussion <[hidden email]> Date: Sun, 26 Mar 2006 16:05:02 -0700 Subject: Re: [OFBiz] Dev - Jsp in widgets > > > Actually, no, it is not possible to include JSPs in a screen widget. Because of the way the JSP specification is written it cannot produce String, Writer, or even interrupted Stream output, not without doing something that is implementation specific (ie one class for doing it for each JSP engine you work with). > > This is one of the many reasons we prefer using a tool like FTL which is a general templating tool and can produce more flexible output. > > For more details on why JSP won't work in this sort of circumstance there are many general commentaries and good documentation and such about it. This is all outside of OFBiz of course. There is some discussion and information in the mailing list archives as well here, but I don't think I'd recommend that route for finding this sort of info. > > -David > > > BJ Freeman wrote: > > if you find an example that has FTL files it should work for JSP as well. > > > > Oleg Kozyrev Jr. sent the following on 3/26/06 1:56 AM: > >> Hello all, > >> > >> Is there any way to include jsp page into widgets? > >> For example: > >> <section> > >> <condition> > >> <if-empty field-name="queryResult"/> > >> </condition> > >> <widgets> > >> <container> > >> ### include jsp page here > >> </container> > >> </widgets> > >> </section> > >> > >> Thanks, > >> > >> _______________________________________________ > >> Dev mailing list > >> [hidden email] > >> http://lists.ofbiz.org/mailman/listinfo/dev > >> > > > > _______________________________________________ > > Dev mailing list > > [hidden email] > > http://lists.ofbiz.org/mailman/listinfo/dev > > _______________________________________________ > Dev mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/dev > Новая версия Агента@Mail.ru! Узнай, кто тебе пишет, не заходя в ящик! http://r.mail.ru/cln2987/agent.mail.ru _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
|
That is the only way to use JSP templates. You can use JSP tags with FreeMarker though. For more information see the freemarker.org site. You may have to customize some FreeMarker code in OFBiz to configure this properly. -David Oleg Kozyrev Jr. wrote: > David, BJ thanks. > > And does it mean that the only way to use some jsp tag library is creating screens with regions tool, like in webtools? > > Like this: > <define id="main" region="MAIN_REGION"> > <put section="title">Main Page</put> > <put section="content" content="/main.jsp" /> > </define> > > Thanks again. > > Oleg. > > -----Original Message----- > From: "David E. Jones" <[hidden email]> > To: OFBiz Project Development Discussion <[hidden email]> > Date: Sun, 26 Mar 2006 16:05:02 -0700 > Subject: Re: [OFBiz] Dev - Jsp in widgets > >> >> Actually, no, it is not possible to include JSPs in a screen widget. Because of the way the JSP specification is written it cannot produce String, Writer, or even interrupted Stream output, not without doing something that is implementation specific (ie one class for doing it for each JSP engine you work with). >> >> This is one of the many reasons we prefer using a tool like FTL which is a general templating tool and can produce more flexible output. >> >> For more details on why JSP won't work in this sort of circumstance there are many general commentaries and good documentation and such about it. This is all outside of OFBiz of course. There is some discussion and information in the mailing list archives as well here, but I don't think I'd recommend that route for finding this sort of info. >> >> -David >> >> >> BJ Freeman wrote: >>> if you find an example that has FTL files it should work for JSP as well. >>> >>> Oleg Kozyrev Jr. sent the following on 3/26/06 1:56 AM: >>>> Hello all, >>>> >>>> Is there any way to include jsp page into widgets? >>>> For example: >>>> <section> >>>> <condition> >>>> <if-empty field-name="queryResult"/> >>>> </condition> >>>> <widgets> >>>> <container> >>>> ### include jsp page here >>>> </container> >>>> </widgets> >>>> </section> >>>> >>>> Thanks, >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> [hidden email] >>>> http://lists.ofbiz.org/mailman/listinfo/dev >>>> >>> >>> _______________________________________________ >>> Dev mailing list >>> [hidden email] >>> http://lists.ofbiz.org/mailman/listinfo/dev >> >> _______________________________________________ >> Dev mailing list >> [hidden email] >> http://lists.ofbiz.org/mailman/listinfo/dev >> > > > Новая версия Агента@Mail.ru! Узнай, кто тебе пишет, не заходя в ящик! > http://r.mail.ru/cln2987/agent.mail.ru > > > _______________________________________________ > Dev mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/dev _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
|
HI,
i called a jsp instead of ftl in controller itself like. <request-map uri="display"> <security https="true" auth="false"/> <event type="service" invoke="display"/> <response name="success" type="view" value="display"/> </request-map> <view-map name="display" page="/upload/display.jsp"/> in java method i wrote like List<GenericValue> nameList = new ArrayList<GenericValue>(); EntityCondition condition1=EntityCondition.makeCondition("id", EntityOperator.EQUALS,id); nameList = delegator.findList("info", condition1, null, null, null, false); now i want this list(namelist) to access in jsp.i tried context like context.put("firstname",firstname) but i am unable to access this firstname value in jsp. how to display this list valuee(ofcourse only one record will be there as data is fetched based on the id) i want to show that record values in jsp like firstname<input type="text" title="First name" name ="firstname" value="<%=firstname%>" readonly="true"/> |
| Free forum by Nabble | Edit this page |
