Custom

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

Custom

Torsten Schlabach-2
Hi all!

I am trying to implement a custom ViewHandler, which should just return
an object (an order in this case) as a plain XML document.

So I tried this (some cut & paste from the corresponding PDF stuff) in
controller.xml

1)

<handler name="screenxml" type="view"
class="org.ofbiz.widget.screen.ScreenXmlViewHandler"/>

(This class does not yet exists, but I want to implement it.)

2)

<request-map uri="order.xml">
        <security https="true" auth="true"/>
        <response name="success" type="view" value="OrderXML"/>
</request-map>

3)

<view-map
        name="OrderXML" type="screenxml"
page="component://order/widget/ordermgr/OrderPrintForms.xml#OrderXML"
content-type="application/attachment"
encoding="none"/>

After having made these changes, re-build the app with ./ant and
restarted, I would have expected some NoClassDefFound exception because
I haven't implemented the ScreenXmlViewHandler class yet.

But instead, the ScreenFopPdfViewHandler seems to be used.

Did I misunderstand the inner workings of the controller servlet?

Regards,
Torsten