Hi Bhaskar,

1. As of OXF 1.5.1, we do not serialize automatically the ActionError
   that you return from the validate() method. We are aware of this
   shortcoming and support for this will be included in the next
   version of OXF. If needed, we can supply a patch in the short
   term.

2. You can do this from Java, although this is not a documented
   feature and subject to change. You have to store a SAXStore in the
   session as follows:

session.setAttribute(key, store);

   where key is the key you will pass to your Session Generator, and
   store is an org.orbeon.oxf.xml.SAXStore().

   A SAXStore can be seen as a SAX ContentHandler, so you can just
   write into it it. For example, if you have a DOM, you can use a
   JAXP identity transformer:

   org.orbeon.oxf.xml.TransformerUtils.getIdentityTransformer()
     .transform(new DOMSource(dom), new SAXResult(store));

I hope this helps,

-Erik

Bhaskar Gopalan wrote:

> Hi,
>
> 1. How do we use the validation error display capability of Struts
> in OXF, i.e. displaying the errors caught by validate() method of a
> form bean?
>
> 2. Session Generators and Serializers can be used to store and
> retrieve XML documents from the current HttpSession. Is there anyway
> of putting the XML doc into the session via Java code (say struts
> action classes), instead of via oxf pipeline?
>
> Thanks,
> Bhaskar




Reply via email to