betterform / betterform Goto Github PK
View Code? Open in Web Editor NEWbetterFORM XForms engine
Home Page: http://betterform.de
betterFORM XForms engine
Home Page: http://betterform.de
Relative referenced schema fail with a NullPointerException.
This is just a test issue
for our egyptologian text archive, we used betterForm with eXist
1.4.1-rev15155 (totenbuch.awk.nrw.de). Recently we tried to upgrade to
eXist 1.4.3-rev17131, but could not get BetterFORMS up and running.
We get an error message "../betterform/nls/betterform-Full_de.js not
found". Our application runs inside of the database. When trying to
load betteform-Full_de file, it looks for it inside of the database
instead of the file system.
Also, our application callsdojo.subscribe("/xf/ready", function(){
fluxProcessor.skipshutdown=true;
});onload, which produces the error "Uncaught ReferenceError: dojo is not
defined". This causes further javascript errors, so that the forms
don't work. Surprisingly, betterform-Full.js and dojo.js are present
and loaded from the file system.Have there been changes compared to the previous version of
betterForms/eXist that we have to consider in our configuration?
The following XForm can cause an NPE -
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:bf="http://betterform.sourceforge.net/xforms">
<head>
<title>Security Groups</title>
</head>
<body>
<xf:model>
<xf:instance id="securitygroups" src="/exist/restxq/oecd/security/group"/>
<xf:bind id="groups" nodeset="group"/>
</xf:model>
<div class="Section" dojotype="dijit.layout.ContentPane">
<xf:group appearance="full" class="contactsFullGroup">
<div class="Headline">Security Groups</div>
<div class="description">List of currently defined Security Groups</div>
<xf:group appearance="minimal">
<xf:repeat appearance="compact" bind="groups" class="orderListRepeat" id="repeatid">
<xf:group appearance="repeated">
<xf:output class="text-right" value="rootCote">
<xf:label class="contactsRepeatHeader">Root Cote</xf:label>
</xf:output>
</xf:group>
</xf:repeat>
</xf:group>
</xf:group>
</div>
</body>
</html>
The document from /exist/restxq/oecd/security/group looks like:
<groups>
<group>
<rootCote>ADAM1</rootCote>
<classification>Confidential</classification>
</group>
</groups>
This causes the following NPE and stack trace:
2013-01-17 14:07:55,575 [eXistThread-45] ERROR (XFormsFilter.java [doFilter]:217) - java.lang.NullPointerException
de.betterform.xml.xforms.exception.XFormsException: java.lang.NullPointerException
at de.betterform.xml.xforms.Container.dispatch(Container.java:461)
at de.betterform.xml.xforms.Container.dispatch(Container.java:419)
at de.betterform.xml.xforms.Container.initModels(Container.java:682)
at de.betterform.xml.xforms.Container.init(Container.java:252)
at de.betterform.xml.xforms.XFormsProcessorImpl.init(XFormsProcessorImpl.java:393)
at de.betterform.agent.web.WebProcessor.init(WebProcessor.java:276)
at de.betterform.agent.web.flux.FluxProcessor.init(FluxProcessor.java:68)
at de.betterform.agent.web.filter.XFormsFilter.doFilter(XFormsFilter.java:209)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:536)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:365)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.NullPointerException
at de.betterform.xml.xforms.ui.RepeatItem.getLocationPath(RepeatItem.java:90)
at de.betterform.xml.xforms.ui.BindingElement.getInstanceId(BindingElement.java:325)
at de.betterform.xml.xforms.ui.state.UIElementStateUtil.getModelItem(UIElementStateUtil.java:112)
at de.betterform.xml.xforms.ui.state.BoundElementState.init(BoundElementState.java:80)
at de.betterform.xml.xforms.ui.BindingElement.initializeElementState(BindingElement.java:467)
at de.betterform.xml.xforms.ui.RepeatItem.init(RepeatItem.java:205)
at de.betterform.xml.xforms.Initializer.initXFormsObject(Initializer.java:270)
at de.betterform.xml.xforms.Initializer.initializeUIElements(Initializer.java:220)
at de.betterform.xml.xforms.ui.RepeatItem.init(RepeatItem.java:206)
at de.betterform.xml.xforms.ui.Repeat.initializeRepeatItem(Repeat.java:646)
at de.betterform.xml.xforms.ui.Repeat.initializeRepeat(Repeat.java:393)
at de.betterform.xml.xforms.ui.Repeat.init(Repeat.java:277)
at de.betterform.xml.xforms.Initializer.initXFormsObject(Initializer.java:270)
at de.betterform.xml.xforms.Initializer.initializeUIElements(Initializer.java:220)
at de.betterform.xml.xforms.ui.AbstractUIElement.initializeChildren(AbstractUIElement.java:167)
at de.betterform.xml.xforms.ui.BindingElement.init(BindingElement.java:95)
at de.betterform.xml.xforms.ui.Group.init(Group.java:60)
at de.betterform.xml.xforms.Initializer.initXFormsObject(Initializer.java:270)
at de.betterform.xml.xforms.Initializer.initializeUIElements(Initializer.java:220)
at de.betterform.xml.xforms.ui.AbstractUIElement.initializeChildren(AbstractUIElement.java:167)
at de.betterform.xml.xforms.ui.BindingElement.init(BindingElement.java:95)
at de.betterform.xml.xforms.ui.Group.init(Group.java:60)
at de.betterform.xml.xforms.Initializer.initXFormsObject(Initializer.java:270)
at de.betterform.xml.xforms.Initializer.initializeUIElements(Initializer.java:220)
at de.betterform.xml.xforms.Initializer.initializeUIElements(Initializer.java:258)
at de.betterform.xml.xforms.Initializer.initializeUIElements(Initializer.java:258)
at de.betterform.xml.xforms.Initializer.initializeUIElements(Initializer.java:186)
at de.betterform.xml.xforms.model.Model.modelConstructDone(Model.java:884)
at de.betterform.xml.xforms.model.Model.performDefault(Model.java:709)
at de.betterform.xml.events.impl.DefaultXMLEventService.dispatch(DefaultXMLEventService.java:196)
at de.betterform.xml.xforms.Container.dispatch(Container.java:441)
... 31 more
Tests should note here which forms they tested with which browser (on which os).
jQuery does not support AMD directly and has not support for module loading and dependency management. The de-facto standard in this are is requirejs (also used by Dojo).
jQuery MUST be loaded via requirejs to avoid namespace pollution and allow a clean modular organisation of the sources.
When loading a schema with
<xf:model schema="schemaLocation">
the URI of the @Schema does not undergo xml:base processing.
Shouldn't be hard to fix as XMLBaseResolver offers the needed static methods.
Built BF from master.
The XForm is rendered in the browser, but no events fire (eg when click submit, or add a row to a repeat).
Chrome dev tools says there is an error in MappingProcessor.js
(In case it is relevant, I'm using XForms repeater)
The development branch works better.
The 'resource' module was introduced once to keep integration-independent resources in one independent place - both the 'betty' and 'web' modules shared this module using the same js + css.
As the development on betty stalled and the web integration is our only one in practice it's more convenient to move the resources to the web module. This will make deployment and maven builds easier.
Currently it looks as if the middle number of the range slider is calculated by dividing the end value by two. This might work if the slider starts 0 or if it starts 1 and ends a high number like 100. But in any other case it can be quite confusing, because the wrong number is centered underneath the slider.
<xf:range ref="value" start="6" end="10" step="1" incremental="true">
<xf:label>Slider: </xf:label>
</xf:range>
Here the number in the middle is 5 even though if the slider is in the center, the value is 8 (5 is not even a valid number for the range).
(default BF that ships with eXist 2.0 [I couldn't find the version number in status panel])
DeclarationViewImpl suddenly has a list of constrains and(!) a single constraint. In ConstraintVertex only the constraints list was evaluated but not the single constraint (which resulted in an error that is now fixed).
There should be no parallel single constraint and multiple constraint handling at all. Proposal: only use the constraints list and remove reference to the single constraint. Review all other MultipleMips changes if they are issues as well.
only first page (index.xhtml) is translated. The rest is still to be done.
The extension mechanism in BF 5 was a step in the right direction (having that on the client-side only) but we should nevertheless look for an even better solution. Web components look promising here.
we had a formatted error output once but it's broken now. See forms/test/brokenform.xhtml. This should output a formatted page with the error but the page gets rendered instead.
Loading the following page throws a "SyntaxError: Unexpected identifier" error in the javascript console, and the page fails to load any UI elements. The problem appears to be related to the apostrophe in the instance relating to the apostrophe in the select1, as if the test element in the instance is changed to just bob
, it loads successfully. Also, switching the select1 for an output statement of the same node works without having to change the instance (included as a comment).
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<head>
<title>Test</title>
<xf:model>
<xf:instance id="main" xmlns="">
<root>
<test>bob's</test>
</root>
</xf:instance>
</xf:model>
</head>
<body>
<xf:select1 ref="instance('main')/test">
<xf:label>Test: </xf:label>
<xf:item>
<xf:label>bob</xf:label>
<xf:value>bob</xf:value>
</xf:item>
<xf:item>
<xf:label>bob's</xf:label>
<xf:value>bob's</xf:value>
</xf:item>
</xf:select1>
<!--<xf:output value="instance('main')/test">
<xf:label>Test 2: </xf:label>
</xf:output>-->
</body>
</html>
Hi,
while perusing the code, I found the following:
I did not test, nor use, the functionality, but it seems wrong that the value SUBMISSION_RESPONSE_STREAM depends on the logging level.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.