Using OXFServletFilter for dynamic XForms instances...

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Using OXFServletFilter for dynamic XForms instances...

Vikas Sasidharan

Hi,

 

This is really an impressive product! Keep up the good work. J

 

In my current project, I have the following scenario:

 

1)       A WebWorks Action receives a request for rendering a business object.

2)       The Action retrieves the object from DB, using a business API.

3)       This object, which can be considered as a dynamic xforms instance, then needs to be rendered using a separate xhtml file.

 

We originally were using Chiba which, being more of an API-based solution had us writing code to store the “xml’ized” object in a “Chiba Context” which can then be retrieved by Chiba for use in rendering. (Of course, then we bumped into OPS and realized that it was far more mature and here I am… J)

 

Just to give some idea, while using Chiba we used to define our XForms model (within the xhtml view) as:

 

      <xf:model id="someModel " … >

 

            <xf:instance id="someObject" src="context:/someObject" />

            …….

 

      </xf:model>

 

Here, the src=”context:/someObject” attribute was an indication to Chiba that the object (in xml form) is available under the “someObject” key in its internal context. Chiba would then pick up this data from the context and automatically insert it into to the above model.

 

So, my question is – is there a similar way in OPS (declarative or otherwise) as well? The catch is that we are planning to stick to the OXFServletFilter instead of going the whole PFC-XPL way. So, to put the question in a simpler way - “while using just the OXFServletFilter, is there a way by which one can pass a java bean(or even its serialized xml representation) to OPS which can then be used as the dynamic xforms instance in an associated view (xhtml page)?”

 

A related question - we also definitely need features like autocomplete and autofill. From my understanding, this should be possible while using the ServletFilter alone. Am I right?

 

Thanks in advance,

Vikas

 

"Quidquid latine dictum sit, altum sonatur"
Whatever is said in Latin, sounds profound

 



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Using OXFServletFilter for dynamic XForms instances...

Larry T. Chen
Hi Vikas,

I ran into the same issue as well.  Our project required it's own servlet and we used the OPS XForms engine via the OXFServletFilter.
When using the PFC-XPL way, you declare the XForms instance like <xf:instance id="someObject" href="input:data"> ... appears that input:data is an internal protocol that the PFC/XPL engine looks for to insert the dynamic XForms instance. 

I couldn't figure out where or how to feed the dynamic instance to the servlet filter via the OPS API, so I ended up just inserting the dynamic instance  programmatically, i.e.  by looking for the <xf:instance id='...'> tag and inserting the dynamic instance myself before outputting the XHTML to the OXFServletFilter.  It does work, but it requires writing your own servlet logic to load the .xhtml and insert the instance.
I don't know if writing your own servlet would work in your situation.

Anybody else know of another way to feed the dynamic instance to the OXFServletFilter?

Larry T. Chen
Sr. Software Engineer
Intelenet Communications, Inc.




Vikas Sasidharan wrote:

Hi,

 

This is really an impressive product! Keep up the good work. J

 

In my current project, I have the following scenario:

 

1)       A WebWorks Action receives a request for rendering a business object.

2)       The Action retrieves the object from DB, using a business API.

3)       This object, which can be considered as a dynamic xforms instance, then needs to be rendered using a separate xhtml file.

 

We originally were using Chiba which, being more of an API-based solution had us writing code to store the “xml’ized” object in a “Chiba Context” which can then be retrieved by Chiba for use in rendering. (Of course, then we bumped into OPS and realized that it was far more mature and here I am… J)

 

Just to give some idea, while using Chiba we used to define our XForms model (within the xhtml view) as:

 

      <xf:model id="someModel " … >

 

            <xf:instance id="someObject" src="context:/someObject" />

            …….

 

      </xf:model>

 

Here, the src=”context:/someObject” attribute was an indication to Chiba that the object (in xml form) is available under the “someObject” key in its internal context. Chiba would then pick up this data from the context and automatically insert it into to the above model.

 

So, my question is – is there a similar way in OPS (declarative or otherwise) as well? The catch is that we are planning to stick to the OXFServletFilter instead of going the whole PFC-XPL way. So, to put the question in a simpler way - “while using just the OXFServletFilter, is there a way by which one can pass a java bean(or even its serialized xml representation) to OPS which can then be used as the dynamic xforms instance in an associated view (xhtml page)?”

 

A related question - we also definitely need features like autocomplete and autofill. From my understanding, this should be possible while using the ServletFilter alone. Am I right?

 

Thanks in advance,

Vikas

 

"Quidquid latine dictum sit, altum sonatur"
Whatever is said in Latin, sounds profound

 


-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws