Hi,
We are developing a Torch Portal MVC application running in separate deployment mode, we have developed several portlets and so far used public render parameters to pass information via portlets. As we add more complexity we have an increasing requirement to provide a mechanism to communicate instance information via portlets asynchronously or without a full page load. One approach we have considered is the possibility to have a shared instance which can be access from any independent form that shares the same session state. Our goal is to have a form write to a shared instance and have other forms with binding to that instance be updated as they would for a document instance. Does this exist currently? If not do you have any suggestions as to how we can solve this issue? Thanks, Ben. |
Hi Ben,
On Fri, Feb 17, 2012 at 5:48 AM, benjamin.dougherty <[hidden email]> wrote: Hi, To my knowledge, binding, ( <xforms:bind> elements) can only apply to data instances declared in the form. The forms are isolated from one another.
In Orbeon, you can call xpl or other web services using the extension function xxforms:call-xpl() or regular xforms:submit (element). In both cases, there would
need to be <xforms:action> elements and/or src= attributes to instances to call REST/GET style web services to initialize instance data when the form is created and/or based on other events.
I cannot immediately think of a way to signal to an xform that some external data has changed (unlike calculate and other bind attributes). The xforms-model-construct-done event will be passed to the model element, so
you can know when the xform is ready after initialization to make submissions or actions to complete the data initialization from the shared source. Let me know if that makes some sense.
Cheers, Hank
Hank Ratzesberger XMLWerks.com -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
In reply to this post by benjamin.dougherty
Ben,
This does not exist currently. You could use the session to exchange information, for example with the XPath functions, xxforms:set-session-attribute() and xxforms:get-session-attribute(): http://wiki.orbeon.com/forms/doc/developer-guide/xforms-xpath-functions#TOC-HTTP-request-functions One question would be when to check for new data in the session. Also, a given form does not "run" between user interactions, it can only react to events coming from the client, so you would have do to updates upon user interaction, or using polling events. You could also exchange information by dispatching custom events from the client: http://wiki.orbeon.com/forms/doc/developer-guide/xforms-javascript-integration#TOC-Dispatching-Events -Erik On Fri, Feb 17, 2012 at 5:48 AM, benjamin.dougherty <[hidden email]> wrote: > Hi, > > We are developing a Torch Portal MVC application running in separate > deployment mode, we have developed several portlets and so far used public > render parameters to pass information via portlets. As we add more > complexity we have an increasing requirement to provide a mechanism to > communicate instance information via portlets asynchronously or without a > full page load. > > One approach we have considered is the possibility to have a shared instance > which can be access from any independent form that shares the same session > state. > > Our goal is to have a form write to a shared instance and have other forms > with binding to that instance be updated as they would for a document > instance. > > Does this exist currently? If not do you have any suggestions as to how we > can solve this issue? > > Thanks, > Ben. > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Shared-session-instance-tp4397281p4397281.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Does this mean you are considering implementing it? I am trying to get dispatch events to work with two portlets but whenever I add a second portlet the dispatchEvents stops working. I noticed both portlets produce two forms on the page both with 'class="xforms-form xforms-layout-nospan"'. Having read http://wiki.orbeon.com/forms/doc/developer-guide/xforms-javascript-integration#TOC-Dispatching-Events it implies you need to set the form class name to something unique, is that correct? Thanks, Ben. |
Administrator
|
>> This does not exist currently.
> > Does this mean you are considering implementing it? I didn't mean that ;) See this FAQ entry about fixing/implementing features: http://wiki.orbeon.com/forms/orbeon-forms-faq/faq-orbeon-forms-support#TOC-When-are-you-going-to-fix-implement > I am trying to get dispatch events to work with two portlets but whenever I > add a second portlet the dispatchEvents stops working. I noticed both > portlets produce two forms on the page both with 'class="xforms-form > xforms-layout-nospan"'. Having read > http://wiki.orbeon.com/forms/doc/developer-guide/xforms-javascript-integration#TOC-Dispatching-Events > it implies you need to set the form class name to something unique, is that > correct? We haven't done much testing with two instances of Orbeon portlets on the same page, so it doesn't surprise me that this is not working properly. It probably needs investigating. If you want to give it a shot, see this page about the JavaScript setup: http://wiki.orbeon.com/forms/doc/contributor-guide/development-environment/javascript-development -Erik -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Ok 'We haven't done much testing with two instances of Orbeon portlets' doesn't sound good we were hoping to use Orbeon as a form processor in our portal solution.
I'm happy to investigate but can you help me understand the dispatchEvent form parameter. When there are multiple forms on a page i.e. in portlets should they have unique form names? If so how is this accomplished? I'm using Liferay 6.1, Orbeon CE version 3.9 with a Spring Portal MVC application using the orbeon filter to forward the xform content to Orbeon standard processor. It all appears to work ok and multiple forms are processed correctly and are active, dispatchEvents is the first stumbling block we have found. I noticed in the comparison chart that PE supports Liferay are there parts missing in CE version or is that just FormRunner which we are not using, we were intending to go PE once we are comfortable Orbeon will satisfy our requirements. Thanks for your time, Ben. |
Administrator
|
Ben,
So far have always been using a single instance of Orbeon Forms within Liferay, so supporting multiple instances on the same page has not been something we have worked much on. This said I am glad most things work even with two instances, that means we went in the right direction! In fact, there is a lot we are doing to make things work properly, like proper namespacing of ids, and even rewriting CSS accordingly. Now if you look at the HTML with e.g. Firebug or similar, do you see that the two portlets have content with ids that are properly prefixed? You can see the implementation of dispatchEvent here: https://github.com/orbeon/orbeon-forms/blob/master/src/resources-packaged/ops/javascript/xforms.js#L1437 The portlet implementation itself checks whether the PE version is enabled, see: https://github.com/orbeon/orbeon-forms/blob/master/src/scala/org/orbeon/oxf/portlet/OrbeonPortlet2DelegateBase.scala If you build from source you can certainly work around this, it's just that the officiel CE builds we provide will have that test enabled. -Erik On Tue, Feb 21, 2012 at 1:57 AM, benjamin.dougherty <[hidden email]> wrote: > Ok 'We haven't done much testing with two instances of Orbeon portlets' > doesn't sound good we were hoping to use Orbeon as a form processor in our > portal solution. > > I'm happy to investigate but can you help me understand the dispatchEvent > form parameter. When there are multiple forms on a page i.e. in portlets > should they have unique form names? If so how is this accomplished? > > I'm using Liferay 6.1, Orbeon CE version 3.9 with a Spring Portal MVC > application using the orbeon filter to forward the xform content to Orbeon > standard processor. It all appears to work ok and multiple forms are > processed correctly and are active, dispatchEvents is the first stumbling > block we have found. > > I noticed in the comparison chart that PE supports Liferay are there parts > missing in CE version or is that just FormRunner which we are not using, we > were intending to go PE once we are comfortable Orbeon will satisfy our > requirements. > > Thanks for your time, > Ben. > > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Shared-session-instance-tp4397281p4406537.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi Erik,
I managed to get this to work across portlets using the methods you described in the previous post, thanks for your help. I thought I'd share my work see attached files below. Ben torchDispatchEventSource.jsp torchDispatchEventTarget.jsp |
Administrator
|
Ben,
Excellent, thanks for sharing. -Erik On Thu, Mar 22, 2012 at 11:21 AM, benjamin.dougherty <[hidden email]> wrote: > Hi Erik, > > I managed to get this to work across portlets using the methods you > described in the previous post, thanks for your help. I thought I'd share my > work see attached files below. > > Ben > > http://orbeon-forms-ops-users.24843.n4.nabble.com/file/n4496422/torchDispatchEventSource.jsp > torchDispatchEventSource.jsp > http://orbeon-forms-ops-users.24843.n4.nabble.com/file/n4496422/torchDispatchEventTarget.jsp > torchDispatchEventTarget.jsp > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Shared-session-instance-tp4397281p4496422.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |