History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: OQ-129
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dick Anderson
Reporter: Dick Anderson
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenQuote

Quotation portlet support for other mime types

Created: 04/Apr/09 01:14 PM   Updated: 23/Apr/09 02:34 PM
Component/s: openquote
Affects Version/s: 1.1
Fix Version/s: 1.1

File Attachments: 1. Text File Iym_oq_patch.txt (88 kb)



 Description  « Hide
The Quotation Portlet is currently hard coded to output HTML. However, for WSRP it is useful to be able to render other mime types.

The most pressing need is to support XForms. We have a partial patch (attached) which replaces the 1.0 HTML code with partial support for XFroms, but a more systematic approach is required.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Dick Anderson - 04/Apr/09 01:19 PM
Patch supplied by Nathan from Eonic

Dick Anderson - 04/Apr/09 01:46 PM
The most appropriate approach would be for the portlet to select a render handler from the factory based on the mime type passed in its request. This can be placed into the quote's context and invoked by each UI element which needs to render.

This has the advantage of separating the mime-type specific code completely from the page elements themselves, and provides an very simple means of extending the portlet to support new mime types in future.

Dick Anderson - 15/Apr/09 03:59 PM - edited
New Renderers added for HTML and XForms:
openquote.ear/lib/openquote.jar/com/ail/openquote/render/Html.java
openquote.ear/lib/openquote.jar/com/ail/openquote/render/XForm.java

Configuration set such that requests with a mime type of text/xml are directed to the XForm handler, and text/html requests are directed to the Html handler.

At this stage the XForms handler is simply a stub; the Html handler is ~20% complete.

More to follow...