From: KevinBenson <km...@ms...> - 2005-06-06 15:06:13
|
Wonderfull thanks, that clears most things up. I do like DENG because it is quite lightweight, my webapp with axis web services, eXist xmldb, and a few other 3rd party components was already getting a little heavyweight so I sort of like how DENG was with just a few pages. I managed to generate the xforms dynamically and let DENG at it. I could probably work around most of the things you mentioned, but the one I think I would need is that setValue on a 2nd instance. That way I could have the full xml instance be first and then a second instance of what the user was editing. The setValue you have I think would work, but requires a "click" hence a button which I really don't want. Okay I guess I will wait around till the next DENG, until then I will look into other things like the heavier chiba or orbeon. Doubt I could help much; probably like everybody else I am quite busy. And to be honest I don't know FLASH at all, but I guess if you wanted any kind of XML/XPATH/XQuery type help then maybe I can look at a few things. If you told me where to actually look for all the source code, so far I have not looked at any files with DENG. Cheers, Kevin -----Original Message----- From: Stefano Debenedetti [mailto:st...@de...] Sent: 06 June 2005 15:04 To: KevinBenson Cc: Deng-Talk Subject: Re: [deng-talk] Deng and xforms questions Hi Kevin, thanks for using Deng and for your feedback :-) answers inline: KevinBenson ha scritto: > I am a little new to all this, but starting to figure out xforms and Deng. > I am experimenting with Deng at the moment and would like to use it for my > xforms. I seem to be having some problems and they really seem quite basic, > so I am not sure what I am doing wrong. Many Thanks in advance for your > help in replying to this: > Below I put down a subsection of my model and input controls. > > Problem 1 - Binding: > I can't seem to get the most basic binding working. Such as having an > element be required. The form is always submitted even if I blank out the > text box. Deng doesn't support model item properties at all, so no relevant, no required, no constraint and so on... > Confirmation: > Can you please confirm that your instance document needs to have all the > elements in there that match your form controls? Quite typically I have a > lot of elements that are optional in the schema hence they might not be in > the instance document, from what I can tell I can have a form control, but > it is ignored because it is not in the instance document and never sent when > I hit submit. Is there a way to have this work (maybe using relevant) where > I can submit data and have it show up in the xml when submitted even if it > was not in the original instance document? The XForms way of doing this is via the "lazy authoring" [1] (instance creation out of form controls [2]), which is not supported by Deng.. [1] http://xformsinstitute.com/lesson1.php [2] http://www.w3.org/TR/xforms/slice4.html#evt-modelConstruct > setvalue: > In the above question if I do need to have everything in the instance > document, then I think I have a workaround by using <xforms:setvalue with a > 2nd instance document that will be in the model. Can somebody give me an > example of a setvalue for a basic input control. And preferbly referencing > a 2nd instance document. I againt tried several things to use setvalue and > nothing. your setvalue should work but it is not for a couple of reasons: 1) xforms-ready is an event targetted at the model, not at the form controls 2) xforms-ready is not supported by Deng anyway :-) while Deng has full XML-Events support, the only event actually defined is "click", which is the wrong name for what should now be called "DOMActivate" so that setvalue should work if you use a trigger: <xf:trigger> <xf:label>click me</xf:label> <xf:setvalue ev:event="click" ref="......">....</xf:setvalue> </xf:trigger> > **side note: I have just noticed that the xforms namespace I use does not > have the "/cr" at the end, but I suspect that does not matter. The controls > seem to be rendered correctly and data is being submitted. yes, both namespaces are supported in Deng. I am sorry to see Deng seems to be falling short of your requirements, Deng development is currently split between a full rewrite [3] and a port to non-flash javascript environments (like IE or Mozilla) [4]. While the first effort AFAIK has not released any code yet, the second offers some improvements over the old Deng: the DOMActivate event, partial "relevant" model item property support, select controls, repeat controls with number > 1.... Any help/patch/code/suggestion will be highly appreciated on both fronts, thanks ciao ste [3] http://wahlers.com.br/claus/blog/?p=21 [4] http://demaledetti.net/ugo/ > ---- > <?xml version="1.0" encoding="iso-8859-1" ?> > <html xmlns:ev="http://www.w3.org/2001/xml-events" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xf="http://www.w3.org/2002/xforms" > xmlns:xforms="http://www.w3.org/2002/xforms" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns="http://www.w3.org/1999/xhtml" > xmlns:xhtml="http://www.w3.org/1999/xhtml" > xmlns:vr="http://www.ivoa.net/xml/VOResource/v0.10"> > .... > > <xforms:model id="model1" xmlns:xforms="http://www.w3.org/2002/xforms"> > <xforms:instance id="resinstance"> > <vr:Resource > xmlns="http://www.ivoa.net/xml/VOResource/v0.10" > xmlns:vr="http://www.ivoa.net/xml/VOResource/v0.10" > xmlns:vs="http://www.ivoa.net/xml/VODataService/v0.5" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > updated="2004-11-20T15:34:22Z" status="inactive"> > <title>File Manager Service Entry</title> > <shortname/> > <identifier>ivo://@REGAUTHORITY@/filemanager-one</identifier> > <curation> > <publisher>testcont</publisher> > </curation> > </vr:Resource> > </xforms:instance> > > <xforms:submission method="post" > action="http://localhost:8080/reg/xforms/XFormsEditEntry.jsp" id="s00"/> > > <!-- the instance data text tends to show up in the text box, but the > required does not work > decided to add constraint to see if it makes a difference nothing. And > tried having the nodeset as /vr:Resource/vr:curation/vr:publisher same > results. --> > <xforms:bind id="pubBind" nodeset="vr:curation/vr:publisher" > constraint="string-length(.) > 10" required="true()" /> > </xforms:model> > ... > > <xforms:input ref="vr:shortname"> > <xforms:label>Short Name:</xforms:label> > <!-- > Tried to do a setValue in several ways sometimes up in the model area > sometimes here. Nothing works. > <xforms:action ev:event="xforms-ready"> > <xforms:setvalue ref="vr:shortname" ev:event="xforms-ready">My > short</xforms:setvalue> > </xforms:action> > <xforms:setvalue bind="stBind" ev:event="xforms-ready">My > short</xforms:setvalue> > <xforms:setvalue ref="vr:shortname" ev:event="xforms-ready">My > short</xforms:setvalue> > --> > </xforms:input> > > > <!-- > Well the text value shows in the text box, but the constraint or being > required never seems to work. > --> > <xforms:input bind="pubBind"> > <xforms:label>Publisher:</xforms:label> > </xforms:input> > > <!-- > Not defined in the instance document and hence cannot get this submitted > in the xml unless it is in the instance document. > --> > <xforms:input ref="vr:curation/vr:contributer"> > <xforms:label>Contributer:</xforms:label> > </xforms:input> > > .... > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput > a projector? How fast can you ride your desk chair down the office luge track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > dengmx-talk mailing list > den...@li... > https://lists.sourceforge.net/lists/listinfo/dengmx-talk > |