From: Fraser H. <fra...@gm...> - 2010-04-09 01:57:26
|
Great work Joern! I got it running with some xquery generated examples and it looks great! For my main CMS application I ran into a few problems: 1. The presence of xf:dispatch elements caused the form to fail (i.e. nothing loaded - just a blank screen) 2. xf:instance elements with an src attribute also caused the form to fail 3. Any control or bind with an xpath expression that points to a non-existent instance caused the form to fail rather than load the control with blank content (perhaps this is ok as long as there is an error message thrown to alert the user) 4. No error messages are thrown so debugging is quite difficult (it took a lot of trial and error to figure out the above) I'm not sure if these are betterForm / eXist integration issues or simply betterForm issues but I thought it would be helpful to mention them here in case others run into similar issues. Cheers, Fraser On Fri, Apr 9, 2010 at 12:19 AM, Joern Turner <joe...@go...>wrote: > Hi guys, > > we have completed a first running integration of the betterform XForms > engine into eXist 1.4.0. > > Please note that this is really a first proof-of-concept and surely > needs some fine-tuning and further input from the eXist experts. We > appreciate any input that improves the integration. > > Installation: > We assume that you have a running standard installation of eXist 1.4.0. > > Attached is a small zip file (<10k) that needs to be copied and > expanded to EXIST_HOME/extensions. > > Important: this file is attached as betterform.zap file. Most > listservers reject .zip files. To use it please rename to > betterform.zip and expand it. This will create the directory > 'betterform' in extensions and create a few files. This are the files > to bootstrap the actual installation (see below). > > In the newly created directory 'betterform' there will be a build.xml > with 2 targets > "install" to integrate the betterform engine into eXist. It will > download a zip file from our server that contains a tailored version > of betterform. > This will be unpacked to > EXIST_HOME/extensions/betterform/target/betterform. Forms, resources > and config files from this source are copied to their appropriate > locations in > - EXIST_HOME/webapp/forms (static XForms) > - EXIST_HOME/webapp/resources (betterform scripts, styles, transforms etc.) > - EXIST_HOME/webapp/xquery (xpGuess.xql - the only xquery demo for now) > - EXIST_HOME/webapp/WEB-INF (betterform config files) > > After that a XSLT adds the necessary configuration to the existing > web.xml (a server restart is necessary). The original web.xml will be > saved for later deinstallation. > > One ugly thing here is that eXist AND betterform have a directory > named 'resources' and these get merged in the during the copying. We > have to sort that out in a next step though deinstallation still > should work correctly. > > Finally we create a start.config in EXIST_HOME/ and add the betterform > extension to the classpath. > > To remove betterform from the current installation simply call "ant > uninstall" and you're done. This will delete all formerly created > files from below EXIST_HOME/webapp and restore the old web.xml > > > To try it > ----------- > after installation (re)start your server and try these URLs: > - http://localhost:8080/exist/forms/demo/registration.xhtml shows one > of our demo forms as an example for a static document > - http://localhost:8080/exist/xquery/xfGuess.xql is a variant of the > standard eXist guess.xql sample translated in XForms to show the > creation of a XForms document in XQuery. > > There one important point to note: notice the line > request:set-attribute("betterform.filter.parseResponseBody", "true"), > > This will signal the XFormsFilter to act upon the response from the > XQuery and create a XForms session. This flag MUST be set explicitly > otherwise the response will not be treated as XForms and simply be > passed through. > > Suggestions and comments highly appreciated. > > Have fun, > > Joern > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > > |