Hi,
i'm evaluating separate deployment and how to migrate my existing application from "embedded deployment" (adding to apps in the orbeon webapp) to separate deployment. Delegating the xforms and xpl processing to the orbeon app works fine, but i'm not sure about how to link model and view for each page as it is possible with the page flow: <page id="a" path-info="/a" model="pages/a/a-model.xpl" view="pages/a/a-view.xhtml" /> Is there a similar way in separate deployment to say: "First, execute XPL a-model.xpl to prepare the data, then pass it to a-view.xhtml so that the data is available at input:instance or input:data"? Is there a way to "map" that instruction to a path, as with a page-flow? Thanks in advance! florian -- 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 |
i wrote:
> <page id="a" path-info="/a" > model="pages/a/a-model.xpl" > view="pages/a/a-view.xhtml" /> > > Is there a similar way in separate deployment to say: "First, execute > XPL a-model.xpl to prepare the data, then pass it to a-view.xhtml so > that the data is available at input:instance or input:data"? Is there a > way to "map" that instruction to a path, as with a page-flow? ok, in the meanwhile i found Erik's reply on a similar question back in nov 2007: http://www.nabble.com/Re%3A-link-model-and-view-in-separate-deployment-p13673779.html but i'm still not sure about how to migrate from embedded to separate deployment. It wouldn't be sufficient to write some jsp's to create the xpls that im currently using, because the xpls usually work with input data passed to them - is this possible with jsp-created xpls? If not: can xpls be used in separate deployment as it was possible with "embedded" deployment - or do i have to replace the functionality they provided with anything else? This seems to be quite complex if one makes heavy use of many OF processors (database access, xslt, pipeline, aggregation...). florian -- 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
|
Florian,
On Feb 7, 2009, at 1:19 AM, Florian Schmitt wrote: > but i'm still not sure about how to migrate from embedded to separate > deployment. It wouldn't be sufficient to write some jsp's to create > the xpls that im currently using, because the xpls usually work with > input data passed to them - is this possible with jsp-created xpls? If > not: can xpls be used in separate deployment as it was possible with > "embedded" deployment - or do i have to replace the functionality they > provided with anything else? This seems to be quite complex if one > makes heavy use of many OF processors (database access, xslt, > pipeline, aggregation...). Florian, with separate deployment, you will either: * Generate the instance to use in the JSP. I.e. really producing the text of the instance between the <xforms:instance> and </ xforms:instance>. In this case you're running Java code in a JSP and don't have access to XPL and processors. * You replace the instance on xforms-model-construct-done by calling a service. Then the service can be implemented in Orbeon using XPL and processors. Does this make sense, or this isn't really the issue you're talking about? Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ Twitter - http://twitter.com/avernet -- 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 |
Alessandro,
> * You replace the instance on xforms-model-construct-done by calling a > service. Then the service can be implemented in Orbeon using XPL and > processors. > Does this make sense, or this isn't really the issue you're talking about? i think i got this point - but my problem is: how can i pass a XML instance to that process? Using the page-flow, this is no problem. But i don't know how to pass dynamic input data to the process you explained. If i use your second suggestion, my xhtml+xforms page A would call xhtml+xforms page B, and page B calls its XPL to prepare the model data. I need a way to make page A tell page B it should use some custom data. For example: page A shows some database records, and the user will select one record to edit the data. Page B would provide xforms controls to edit the data, and it would call a XPL to load the record from the database. But how can i tell page B _which_ record is selected? A solution could be to make the selection persistet in the session scope or something like that, so page B would check the scope for input data. Is there another, direct way to pass the selected value from page A to page B? florian -- 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
|
Florian,
On Feb 11, 2009, at 11:20 PM, Florian Schmitt wrote: > For example: page A shows some database records, and the user will > select one record to edit the data. Page B would provide xforms > controls > to edit the data, and it would call a XPL to load the record from the > database. But how can i tell page B _which_ record is selected? Ah, I see. If you run an <xforms:submission replace="all"> from page A to page B, the instance will be posted to page B. So in your Java/JSP code for page B you can access the posted instance. Using Dom4j, the code you would have in the JSP would look like: SAXReader xmlReader = new SAXReader(); Document instanceDocument = xmlReader.read(request.getInputStream()); Then instanceDocument contains the instance that was posted from page A to page B. Storing the instance in the session, in page A before you go to page B, and then retrieving it in page B is also a solution, but using the session this way can cause all kind of problems, so I would rather recommend you just retrieve the posted instance in page B. Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ Twitter - http://twitter.com/avernet -- 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 |
Alessandro,
> Ah, I see. If you run an <xforms:submission replace="all"> from page A > to page B, the instance will be posted to page B. So in your Java/JSP > code for page B you can access the posted instance. Using Dom4j, the > code you would have in the JSP would look like: > > SAXReader xmlReader = new SAXReader(); > Document instanceDocument = xmlReader.read(request.getInputStream()); > > Then instanceDocument contains the instance that was posted from page A > to page B. florian -- 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
|
Florian,
On Feb 12, 2009, at 10:55 PM, Florian Schmitt wrote: > great! :-) this was the missing point indeed - thanks a lot for the > help! I'm glad to see that this worked! Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ Twitter - http://twitter.com/avernet -- 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 |