You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by vijay Si <st...@gmail.com> on 2007/09/27 16:20:14 UTC

Accessing a script file from the ftl file.

Hi,

I have this requirement,

In one of the .ftl files it is required to invoke a small script that would
make an xml file for me.

It is like

<object>
<heigth>
<width>
<param name=" "    value="./../../filename.ext?xml_source=script-file">

now there are two requirements
1) this script file should be invoked when the line <param name......> is
parsed and
2) This script file should contain display as well as scripting features.(eg
jsp or php...or may be something else)

So is it possible to invoke this file when the above statement is
parsed..........(This file may also querry data base using entity
engine..........)?
And also is there any way to use existing ofbiz elements(like bsh for
scripting) for this requirement.

Regards

Re: Accessing a script file from the ftl file.

Posted by Jacques Le Roux <ja...@les7arts.com>.
For HttpEngine you should have a look in webtools at 
https://localhost:8443/webtools/control/availableServices?sel_service_name=localhostClearAllEntityCaches

Not sure it will help you for your need but you may find a track there

Jacques

De : "vijay Si" <st...@gmail.com>
> Hi i did some reading on ofbiz and wanted to understand something:
> 
> HttpEngine:  If i declare it in controller.xml, then how does it get invoked
> and also when? (..bit confused)
> My requirement is
> when the following line is encontered in the .ftl(or may be jsp) file :
> <object>
> PARAM name="xyz " value="abc.ext&xml_source=sample.jsp"
> </object>
> the sample.jsp script should run.
> 
> While this jsp runs it creates <tags>  readable by abc.ext and also has some
> scriptlets to generate dynamic data.
> I did look at the webtools but did not find much relating to my requirement
> (correct me if i am wrong)
> 
> Regards
> 
> On 9/28/07, BJ Freeman <bj...@free-man.net> wrote:
> >
> > look at the webtools export functions.
> >
> > vijay Si sent the following on 9/27/2007 7:20 AM:
> > > Hi,
> > >
> > > I have this requirement,
> > >
> > > In one of the .ftl files it is required to invoke a small script that
> > would
> > > make an xml file for me.
> > >
> > > It is like
> > >
> > > <object>
> > > <heigth>
> > > <width>
> > > <param name=" "    value="./../../filename.ext?xml_source=script-file">
> > >
> > > now there are two requirements
> > > 1) this script file should be invoked when the line <param name......>
> > is
> > > parsed and
> > > 2) This script file should contain display as well as scripting
> > features.(eg
> > > jsp or php...or may be something else)
> > >
> > > So is it possible to invoke this file when the above statement is
> > > parsed..........(This file may also querry data base using entity
> > > engine..........)?
> > > And also is there any way to use existing ofbiz elements(like bsh for
> > > scripting) for this requirement.
> > >
> > > Regards
> > >
> >
> 

Re: Accessing a script file from the ftl file.

Posted by BJ Freeman <bj...@free-man.net>.
not a complete answer,

assuming your are using the standard way to get your app in ofbiz,
the module you are in uses the controller for that module.
it is invoke by the url like
\partymgr\controller\main
the <ofbizurl> parm adds the \module\controller\
so you are not specifying a actual page in the URL but a name that the
controller has in it.
it is the controller that has the reference to a page.

 am not up on tags, but think that you can look at the sample TLD files
and work back to how they work.

data is passed by the session and are fielded by java as
HttpServletRequest request,
			HttpServletResponse response

hope that helps



vijay Si sent the following on 9/29/2007 5:01 AM:
> Hi i did some reading on ofbiz and wanted to understand something:
> 
> HttpEngine:  If i declare it in controller.xml, then how does it get invoked
> and also when? (..bit confused)
> My requirement is
> when the following line is encontered in the .ftl(or may be jsp) file :
> <object>
> PARAM name="xyz " value="abc.ext&xml_source=sample.jsp"
> </object>
> the sample.jsp script should run.
> 
> While this jsp runs it creates <tags>  readable by abc.ext and also has some
> scriptlets to generate dynamic data.
> I did look at the webtools but did not find much relating to my requirement
> (correct me if i am wrong)
> 
> Regards
> 
> On 9/28/07, BJ Freeman <bj...@free-man.net> wrote:
>> look at the webtools export functions.
>>
>> vijay Si sent the following on 9/27/2007 7:20 AM:
>>> Hi,
>>>
>>> I have this requirement,
>>>
>>> In one of the .ftl files it is required to invoke a small script that
>> would
>>> make an xml file for me.
>>>
>>> It is like
>>>
>>> <object>
>>> <heigth>
>>> <width>
>>> <param name=" "    value="./../../filename.ext?xml_source=script-file">
>>>
>>> now there are two requirements
>>> 1) this script file should be invoked when the line <param name......>
>> is
>>> parsed and
>>> 2) This script file should contain display as well as scripting
>> features.(eg
>>> jsp or php...or may be something else)
>>>
>>> So is it possible to invoke this file when the above statement is
>>> parsed..........(This file may also querry data base using entity
>>> engine..........)?
>>> And also is there any way to use existing ofbiz elements(like bsh for
>>> scripting) for this requirement.
>>>
>>> Regards
>>>
> 

Re: Accessing a script file from the ftl file.

Posted by vijay Si <st...@gmail.com>.
Hi i did some reading on ofbiz and wanted to understand something:

HttpEngine:  If i declare it in controller.xml, then how does it get invoked
and also when? (..bit confused)
My requirement is
when the following line is encontered in the .ftl(or may be jsp) file :
<object>
PARAM name="xyz " value="abc.ext&xml_source=sample.jsp"
</object>
the sample.jsp script should run.

While this jsp runs it creates <tags>  readable by abc.ext and also has some
scriptlets to generate dynamic data.
I did look at the webtools but did not find much relating to my requirement
(correct me if i am wrong)

Regards

On 9/28/07, BJ Freeman <bj...@free-man.net> wrote:
>
> look at the webtools export functions.
>
> vijay Si sent the following on 9/27/2007 7:20 AM:
> > Hi,
> >
> > I have this requirement,
> >
> > In one of the .ftl files it is required to invoke a small script that
> would
> > make an xml file for me.
> >
> > It is like
> >
> > <object>
> > <heigth>
> > <width>
> > <param name=" "    value="./../../filename.ext?xml_source=script-file">
> >
> > now there are two requirements
> > 1) this script file should be invoked when the line <param name......>
> is
> > parsed and
> > 2) This script file should contain display as well as scripting
> features.(eg
> > jsp or php...or may be something else)
> >
> > So is it possible to invoke this file when the above statement is
> > parsed..........(This file may also querry data base using entity
> > engine..........)?
> > And also is there any way to use existing ofbiz elements(like bsh for
> > scripting) for this requirement.
> >
> > Regards
> >
>

Re: Accessing a script file from the ftl file.

Posted by BJ Freeman <bj...@free-man.net>.
look at the webtools export functions.

vijay Si sent the following on 9/27/2007 7:20 AM:
> Hi,
> 
> I have this requirement,
> 
> In one of the .ftl files it is required to invoke a small script that would
> make an xml file for me.
> 
> It is like
> 
> <object>
> <heigth>
> <width>
> <param name=" "    value="./../../filename.ext?xml_source=script-file">
> 
> now there are two requirements
> 1) this script file should be invoked when the line <param name......> is
> parsed and
> 2) This script file should contain display as well as scripting features.(eg
> jsp or php...or may be something else)
> 
> So is it possible to invoke this file when the above statement is
> parsed..........(This file may also querry data base using entity
> engine..........)?
> And also is there any way to use existing ofbiz elements(like bsh for
> scripting) for this requirement.
> 
> Regards
>