Problem in controller.xml

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

Problem in controller.xml

Prabhakar Pandey
Hi,
what does these two lines do?

<include
location="component://common/webcommon/WEB-INF/common-controller.xml"/>
    <include
location="component://common/webcommon/WEB-INF/portal-controller.xml"/>

do i need  to include these two lines in every controller?

when i mention
<view-map name="main" type="ftl" page="main.ftl"/>

it gives an error *ERROR rendering error page [/error/error.jsp], but here
is the error text: java.io.FileNotFoundException: Template
component://common/webcommon/includes/htmlTemplate.ftl not found.

how to resolve this 1?
*
Reply | Threaded
Open this post in threaded view
|

Re: Problem in controller.xml

Rishi Solanki
The include controller tag includes all the resources available in the
controller. For example;
In common-controller.xml if you start from top then you see the following
entries;
- error page entry, it will tell the controller which page will show on
error. Even if you can override in your own controller, if not it will
point to same relative position of the component you have added.
- Event Handlers, these are the event handlers which in turn you use while
setting a request uri entry in the controller file.
- View Handlers, while setting view map and setting the type="ftl" it will
refer to mapped handler entry in the controller.
- There are some pre-processors and post-processor events which should
update or check something in every requests.
- Request uri entries.

When you include a controller in your controller then all these entries
will be available in your controller. Now if you want to do not include
controller then you can skip this and copy all required handlers, pre and
post processor entries in your own controller.

For resolving the specific problem you mentioned, please check that the
htmlTemplate.ftl is at the same location or at different location you have
entered or or it exists or not.

--
Rishi Solanki
Manager, Enterprise Software Development
HotWax Media Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxmedia.com


On Thu, Jul 12, 2012 at 10:31 AM, Prabhakar Pandey <[hidden email]>wrote:

> Hi,
> what does these two lines do?
>
> <include
> location="component://common/webcommon/WEB-INF/common-controller.xml"/>
>     <include
> location="component://common/webcommon/WEB-INF/portal-controller.xml"/>
>
> do i need  to include these two lines in every controller?
>
> when i mention
> <view-map name="main" type="ftl" page="main.ftl"/>
>
> it gives an error *ERROR rendering error page [/error/error.jsp], but here
> is the error text: java.io.FileNotFoundException: Template
> component://common/webcommon/includes/htmlTemplate.ftl not found.
>
> how to resolve this 1?
> *
>
Reply | Threaded
Open this post in threaded view
|

Re: Problem in controller.xml

dhiraj.g
In reply to this post by Prabhakar Pandey
Hi
In Controllar.xml you can not call ftl  file  directlly in view-map tag.We generally call screen in view-map.




Thanks
Dhiraj Gupta  
Dhiraj Gupta
Reply | Threaded
Open this post in threaded view
|

Re: Problem in controller.xml

Rishi Solanki
Support is available please check -
http://www.opensourcestrategies.com/ofbiz/hello_world1.php

--
Rishi Solanki
Manager, Enterprise Software Development
HotWax Media Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxmedia.com


On Thu, Jul 12, 2012 at 2:06 PM, dhiraj.g <[hidden email]> wrote:

> Hi
> In Controllar.xml you can not call ftl  file  directlly in view-map tag.We
> generally call screen in view-map.
>
>
>
>
> Thanks
> Dhiraj Gupta
>
> -----
> dhirajgupta
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Problem-in-controller-xml-tp4634717p4634729.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Problem in controller.xml

Sachin
You can add ftl files in controller.xml

Please add this handler in controller.xml

<handler name="ftl" type="view" class="org.ofbiz.webapp.ftl.FreeMarkerViewHandler"/>