Search Results

Search found 25 results on 1 pages for 'xforms'.

Page 1/1 | 1 

  • xforms: how to prevent xxforms:default value from over-writing user input

    - by Purni
    I have a dropdown to display status, which can be Enabled(true) or Disabled(false). Here is my xml instance. <?xml version="1.0" encoding="UTF-8"?> <page> <file-name></file-name> <status></status> </page> By default, status should be true. So I have set it in binding as follows. <xforms:bind nodeset="./status" xxforms:default="true()" /> When user chooses Disabled in the dropdown, the status should get saved as false. Here is the xml that gets saved when I save the form. <page> <file-name>StatusDisabled.xml</file-name> <status>false</false> </page> When I open the form in edit mode, this is the xml I get in the XML inspector widget. <page> <file-name>StatusDisabled.xml</file-name> <status>true></status> </page> Status gets set to true because of xxforms:default, even though the xml is saved with a false value for status. How can I fix this? Here is the xhtml: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"> <head> <title>XForms Default</title> <xforms:model> <xforms:instance id="instance"> <page> <name xmlns=""/> <status xmlns=""/> </page> </xforms:instance> <xforms:instance id="status-instance"> <items> <item label="Enabled" value="true" xmlns=""/> <item label="Disabled" value="false" xmlns=""/> </items> </xforms:instance> <xforms:bind nodeset="instance('instance')"> <xforms:bind nodeset="./status" xxforms:default="true()" /> </xforms:bind> </xforms:model> </head> <body> <p> <xforms:input ref="instance('instance')/name" incremental="true"> <xforms:label>Please enter your name:</xforms:label> </xforms:input> </p> <p> <xforms:select1 ref="instance('instance')/status" appearance="minimal" incremental="true"> <xforms:label>Please select status:</xforms:label> <xforms:itemset nodeset="instance('status-instance')/item"> <xforms:label ref="./@label"/> <xforms:value ref="./@value"/> </xforms:itemset> </xforms:select1> </p> </body> </html>

    Read the article

  • How to load and pass a Xforms form in Orbeon (How to Send instance to XForms) ?

    - by Clem
    Hi, I am using the Orbeon Forms solution to generate messages from filled-in web forms. I read different code snippetse in Orbeon's wiki on XForms submission from a pipeline, and I tried different solutions but it doesn't work, and there is no example with a POST from a pipeline, caught by a PFC and sent to an XForms view that receives the posted data (all examples are done in the same page). I have the following pipeline which is received on his instance input: pipelineWrite.xpl <p:config ...> <p:param name="instance" type="input"/> <!-- instance containing the data of the form filled by user --> <p:param name="data" type="output"/> <p:processor name="oxf:java"> <!-- transforms the data into a file --> <p:input name="config"> <config sourcepath="." class="ProcessorWriteCUSDECCD001B"/> </p:input> <p:input name="input" href="#instance"/> <p:output name="output" id="file"/> <!-- XML containing the url of the file --> </p:processor> <p:processor name="oxf:xforms-submission"> <!-- post the XML to the success view --> <p:input name="submission"> <xforms:submission method="post" action="/CUSDECCD001B/success" /> </p:input> <p:input name="request" href="#file"/> <p:output name="response" ref="data"/> </p:processor> </p:config> Then there is the PFC which catch the actions : page-flow.xml <config xmlns="http://www.orbeon.com/oxf/controller"> <page path-info="/CUSDECCD001B/" view="View/ViewForm.xhtml"/> <!-- load the form to be filled in by user --> <page path-info="/CUSDECCD001B/write" model="Controller/PipelineWrite.xpl"/> <!-- send the instance of the form filled to the pipeline above --> <page path-info="/CUSDECCD001B/success" view="View/ViewSuccess.xhtml"/> <!-- send the instance containing the url of the file to the success view --> <epilogue url="oxf:/config/epilogue.xpl"/> </config> Then there is the success view, which is very simple : ViewSuccess.xhtml <html ... > <head> <title>Generation OK</title> <xforms:model> <xforms:instance id="FILE" src="input:instance"> <files xmlns=""> <file mediaType="" filename="" size="" /> </files> </xforms:instance> </xforms:model> </head> <body> Click here to download : <xforms:output ref="//file" appearance="xxforms:download"> <xforms:filename ref="@filename"/> <xforms:mediatype ref="@mediatype"/> <xforms:label>Download</xforms:label> </xforms:output> </body> </html> The problem is that the post is done well, the PFC catches the action well, load the correct view, but the view is loaded with no data (the view doesn't find the data on his instance input). I tried with a GET in the view to retrieve the POST data, and that's the same thing. No data is retrieved. So the download button doesn't work. I hope I'm clear enough to find a solution. Thanks in advance.

    Read the article

  • Server side Xforms form validation and integration into ASP.NET

    - by Nigel
    I have recently been investigating methods of creating web-based forms for an ASP.NET web application that can be edited and managed at runtime. For example an administrator might wish to add a new validation rule or a new set of fields. The holy grail would provide a means of specifying a form along with (potentially very complex) arbitrary validation rules, and allocation of data sources for each field. The specification would then be used to update the deployed form in the web application which would then validate submissions both on the client side and on the server side. My investigations led me to Xforms and a number of technologies that support it. One solution appears to be IBM Lotus Forms, but this requires a very large investment in terms of infrastructure, which makes it infeasible, although the forms designer may be useful as a stand-alone tool for creating the forms. I have also discounted browser plug-ins as the form must be publicly visible and cross-browser compliant. I have noticed that there are numerous javascript libraries that provide client side implementations given an Xforms schema. These would provide a partial solution but server side validation is still a requirement. Another option seems to involve the use of server side solutions such as the Java application Orbeon. Orbeon provides a tool for specifying the forms (although not as rich as Lotus Forms Designer), but the most interesting point is that it can translate an XForms schema into an XHTML form complete with validation. The fact that it is written in Java is not a big problem if it is possible to integrate with the existing ASP.NET application. So my question is whether anyone has done this before. It sounds like a problem that should have been solved but is inherently very complex. It seems possible to use an off-the-shelf tool to design the form and export it to an Xforms schema and xhtml form, and it seems possible to take that xforms schema and form and publish it using a client side library. What seems to be difficult is providing a means of validating the form submission on the server side and integrating the process nicely with .NET (although it seems the .NET community doesn't involve themselves with XForms; please correct me if I'm wrong on this count). I would be more than happy if a product provided something simple like a web service that could validate a submission against a schema. Maybe Orbeon does this but I'd be grateful if somebody in the know could point me in the right direction before I research it further. Many thanks.

    Read the article

  • Link XSL Style Sheet to XForms generated XML document

    - by iHeartGreek
    Hi! Through XForms, I generate an XML document. I need this XML document to be transformed by a specific XSL. How do I link the XSL to the XML through XForms? Example of link: <?xml-stylesheet type="text/xsl" href="test.xsl"?> (The XML doc gets regenerated every time the XForms submits to it.. so I cannot hardcode the link in the XML doc, in needs to be done through the XForms) Thanks!

    Read the article

  • Default Values in XForms Input

    - by Josh
    I have an XForm that has certain fields that may often be left blank (optional street address). Is there is technique to set a default value for that field, preferably a space (I am running into weird formatting issues with CSS). The html form way of value="" doesn't work, neither does setting a default value in the XML schema. EXAMPLE: <xforms:input ref="clientaddress/streetaddress2" model="model_inventory" > <xforms:label>Street Address (Line 2)</xforms:label> Leaving this field blank results in <streetaddress2/> in the resulting xml document I want <streetaddress> </streetaddress>

    Read the article

  • XForms: set relevancy for a list

    - by Purni
    I have a list element in my model instance. I am using Orbeon XForms. <mypage> <list name='mylist'/> <status /> </mypage> Status can be Private or Public. In xforms:binding, I want to set relevant attribute for showing/hiding the list. The list is bound to a drop-down. If status is Private I want to show the list, if status is Public I want to hide the list. I tried the following and it does not work. <xforms:bind nodeset="instance('myinstance')/list[@name='mylist']" relevant="instance('myinstance')/status='Private'" />

    Read the article

  • XForms: set default selection in dropdown in binding

    - by Purni
    I have a main instance named 'myinstance' which has the element . Color can be 'Red', 'Blue', 'Green' or ''Yellow'. The colors are populated in a drop-down from another instance called 'colorsinstance'. When my form loads, I want the default in the dropdown to be set to 'Green' in the nodeset binding. <instance id="colorsinstance"> <items> <item label="Color1" value="Red"/> <item label="Color2" value="Blue"/> <item label="Color3" value="Green"/> <item label="Color4" value="Yellow"/> </items> </instance> Main instance binding is as follows: <xforms:bind nodeset="instance('myinstance')"> <xforms:bind nodeset="./color" required="true()"/> </xforms:bind>

    Read the article

  • XForms relation of 'constraint' and 'required' properties

    - by Danny
    As a reference, the most similar question already asked is: http://stackoverflow.com/questions/8667849/making-xforms-enforce-the-constraint-and-type-model-item-properties-only-when-fi The difference is that I cannot use the relevant properties since I do want the field to be visible and accessible. I'm attempting to make a XForms form that has the following properties: It displays a text field named 'information'. (for the example) This field must not be required, since it may not be necessary to enter data. (Or this data will be entered at a later time.) However, if data is entered in this field, it must adhere to the specified constraint. I cannot mark the field as not relevant since this would hide the field and some data may need to be entered in it. The trouble now is that even though the field has no data in it, the constraint is still enforced (i.e. even though it is not marked as 'required'). I have taken a look at the XForms 1.1 specification, however it does not seem to describe how the properties 'required' and 'constraint' should interact. The only option I see, is to add a part to the constraint such that an empty value is allowed. e.g.: . = '' or <actual-constraint However, I don't like this. It feels like a workaround to add this to every such field. Is there any other way to express that non-required fields should not need to match the constraint for that field? (Am I missing something?)

    Read the article

  • XForms and multiple inputs for same model tag

    - by iHeartGreek
    Hi! I apologize ahead of time if I am not asking this properly.. it is hard to put into words what I am asking.. I have XForms model such as: <file> <criteria> <criterion></criterion> </criteria> </file> I want to have multiple input text boxes that create a new criterion tag. user interface such as: <xf:input ref="/file/criteria/criterion" model="select_data"> <xf:label>Select</xf:label> </xf:input> <xf:input ref="/file/criteria/criterion" model="select_data"> <xf:label>Select</xf:label> </xf:input> <xf:input ref="/file/criteria/criterion" model="select_data"> <xf:label>Select</xf:label> </xf:input> And I would like the XML output to look like this (once user has entered in info): <file> <criteria> <criterion>AAA</criterion> <criterion>BBB</criterion> <criterion>CCC</criterion> </criteria> </file> The way I have it doesn't work, as it sees the 3 input fields to be referring all to the same criterion tag. How do I differentiate? Thanks! I hope that made some sense! BEGIN FIRST EDIT Thanks for the responses for the basic text box! However, I now need to do this with a listbox. But for the life of me, I can't figure out how. I read somewhere to use with the xforms:select and deselect events.. but I didn't know where to place them, and the places I tried gave me very weird behaviour. I am currently implementing the following: <xf:select ref="instance('criteria_data')/criteria/criterion" selection="" appearance="compact" > <xf:label>Choose criteria</xf:label> <xf:itemset nodeset="instance('criteria_choices')/choice"> <xf:label ref="@label"></xf:label> <xf:value ref="."></xf:value> </xf:itemset> </xf:select> However when multiple choices are submitted, all selection values are inserted into the same node, separated by spaces. For example: If AAA and BBB and FFF were selected from listbox, it would result in the following XML: <criterion>AAA BBB FFF</criterion> How do I change my code to have each selection be in a separate node? i.e. I want it to look like this: <criterion>AAA</criterion> <criterion>BBB</criterion> <criterion>FFF</criterion> Thanks! END FIRST EDIT BEGIN SECOND EDIT: For the listboxes (ie xf:select appearance="compact") I ended up allowing the spaces to occur in the same node and then just transformed that xml using xsl to generate a properly formatted new xml doc (with separate individual nodes). Unfortunately, I did not find a less cumbersome solution by inserting them originally into separate nodes. The selected answer works very well for text boxes however, hence why I selected it as the answer. END SECOND EDIT

    Read the article

  • Using Recaptcha with EPiServer XForms

    - by Andy
    Hi, Does any one have experiense of using Recaptcha with XForms in EPiServer? I don't know where to put the Recaptcha control and how to make it work. The sample code for ASP.NET is the code below. Where should i put it. My guess is in the FormControl_BeforeSubmitPostedData? <%@ Page Language="VB" % <%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" % Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs) If Page.IsValid Then lblResult.Text = "You Got It!" lblResult.ForeColor = Drawing.Color.Green Else lblResult.Text = "Incorrect" lblResult.ForeColor = Drawing.Color.Red End If End Sub

    Read the article

  • xforms "instance namespace" issue

    - by user302254
    I am creating an Xform that reads an XML document and creates an input form for updating the document. However, apparently due to a namespace issue none of my Xpath expressions resolve.My form works fine on a simple instance when the instance file has no namespace. However, I need the namespace support. My instance file has a namespace "ai:inventory." I am referencing the instance data Where should I be declaring the prefix "ai" for my namespace so that my XPath expressions can find the appropriate elements? /ai:inventory/products ? I've tried creating the prefix in the html opening tag... that didn't help. thanks,

    Read the article

  • Can XPath concatenate two nodeset values? (for use in XForms)

    - by iHeartGreek
    Hi! I am wanting to concatenate two nodeset values using XPath in XForms. I know that XPath has a concat(string, string) function, but how would I go about concatenating two nodeset values? BEGIN EDIT: I tried concat function.. I tried this.. and variations of it to make it work, but it doesn't <xf:value ref="concat(instance('param_choices')/choice/root, .)"/> END EDIT Below is a simplified code example of what I am trying to achieve. XForms model: <xf:instance id="param_choices" xmlns=""> <choices> <root label="Param Choices">/param</root> <choice label="Name">/@AAA</choice> <choice label="Value">/@BBB</choice> </choices> </xf:instance> XForms ui code that I currently have: <xf:select ref="instance('criteria_data')/criteria/criterion" appearance="full"> <xf:label>Param choices:</xf:label> <br/> <xf:itemset nodeset="instance('param_choices')/choice"> <xf:label ref="@label"></xf:label> <xf:value ref="."></xf:value> </xf:itemset> </xf:select> (if user selects "Name" checkbox..) the XML output is: <criterion>/@BBB</criterion> However! I want to combine the root nodeset value with the current choice nodeset value. Essentially: <xf:value ref="(instance('definition_choices')/choice/root) + ."/> to achieve the following XML output: <criterion>/param/@BBB</criterion> Any suggestions on how to do this? (I am fairly new to XPath and XForms) p.s. what I am asking makes sense to me when I typed it out, but if you have trouble figuring out what I'm asking, just let me know.. thanks!

    Read the article

  • Testing whether an event has happened after a period of time in jQuery

    - by chrism
    I'm writing a script for a form-faces xforms product that is keyed off an event built into form faces. The event is called 'xforms-ready'. I have define 'startTime' as happening as soon as the document in 'ready'. What I want the script to do is warn the user that it is taking too long before the 'xforms-ready' happens, say if it's been 6 seconds since 'startTime'. I can easily do things when the 'xforms-ready' event happens using the code below: new EventListener(document.documentElement, "xforms-ready", "default", function() { var endTime = (new Date()).getTime(); } ); however the warning will want to happen before 'endTime' is defined. So I guess I want something that works like this: If 6 seconds has passed since startTime and endTime is not yet defined do X or possibly more efficiently: If 6 seconds has passed since startTime and 'xforms-ready' has not yet happened do X Can anyone suggest a way of doing this?

    Read the article

  • Possible to set two values for two different nodes from user input in XForms?

    - by iHeartGreek
    Hi! I would like to set two values for two different nodes from user input in XForms. I am curious about how this is done, if at all possible. For example, if I have the following data model: <xf:instance id="criteria_data" xmlns=""> <criteria> <set> <root></root> <criterion></criterion> </set> </criteria> </xf:instance> <xf:instance id="choices" xmlns=""> <choices> <root label="The Choices">/AAA</root> <choice label="BBB">/@BBB</choice> </choices> </xf:instance> <xf:instance id="choices" xmlns=""> <choices> <root>/AAA</root> <choice label="BBB">/@BBB</choice> <choice label="CCC">/@CCC</choice> <choices> </xf:instance> <xf:bind id="data_criterion" nodeset="instance('criteria_data')/criteria/set/criterion"/> <xf:bind id="data_root" nodeset="instance('criteria_data')/criteria/set/root"/> <xf:bind id="choices_root" nodeset="instance('choices')/root"/> <xf:bind id="choices" nodeset="instance('choices')/choice"/> and my ui code looks like: <xf:select bind="data_criterion" appearance="full"> <xf:label>Your choices:</xf:label> <xf:itemset bind="choices"> <xf:label ref="@label"></xf:label> <xf:value ref="."></xf:value> </xf:itemset> </xf:select> But I essentially want it to be like this (though this is invalid and does not produce any xml at all): <xf:select appearance="full"> <xf:label>Your choices:</xf:label> <xf:itemset bind="choices"> <xf:label ref="@label"></xf:label> <xf:value bind="data_criterion" ref="."></xf:value> <xf:value bind="data_root" ref="instance('choices')/root"></xf:value> </xf:itemset> </xf:select> The XML output I want to achieve (if user checks "BBB"): <criteria> <set> <root>/AAA</root> <criterion>/@BBB</criterion> </set> </criteria> How can I achieve setting these two nodes for the one checkbox seletion? Hope that all made sense... Thanks! :)

    Read the article

  • xform data grid

    - by user302254
    I am using orbeon to process my xforms. I am attempting to create a data grid that I can use to copy and paste rows/columns of data from my clipboard (excel). Do you have any clue how I can implement this?

    Read the article

  • Allowing Xform controls for optional XML elements

    - by Cam
    Hi, In designing an XForm interface to an XML database (using eXist and XSLTForms), I'd like to include an input control for an optional element. The XML data records already exist and while some contain the optional element, others don't. To update a record, I'm using the existing XML record as the model instance. The problem is that the form control is not displayed when the optional element is not present, which is logical, but presents a problem when a user wants to add data to the optional element. To be more explicit, here's an example data record, data.xml: <a> <b>content</b> </a> with RNC schema: start = element a { element b { text }, element notes { text }? } XForms model: <xf:model> <xf:instance xmlns="" src="data.xml"/> <xf:submission id="save" method="post" action="update.xq" /> </xf:model> And control: <xf:input ref="/a/notes"> <xf:label>Notes (optional): </xf:label> </xf:input> The problem is that the 'Notes' input control is simply not displayed. An obvious solution is to add a trigger button to allow the user to insert the element if needed, but it is preferable to just have the input control appear, and be empty. My question is: is there some subtle combination of lesser-know attributes/binds/multiple instances/xpath expressions that will cause the control to always be displayed? Thanks

    Read the article

  • Connect Orbeon Xform to External Exist DB

    - by user302254
    I am attempting to connect a new Orbeon XForm to an existing exist db. My code should submit an xml doc to be stored in that database. <xf:submission id="save-to-file" method="get" action="http://server:8081/exist/rest//test/test/inventory_sample.xml" replace="instance" instance="data-instance" includenamespaceprefixes="ai"/> When attempting to submit my xml file, my log reveals an authentication error: Apr 6, 2010 2:06:08 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme INFO: basic authentication scheme selected Apr 6, 2010 2:06:08 PM org.apache.commons.httpclient.HttpMethodDirector processW WWAuthChallenge INFO: No credentials available for BASIC 'exist'@kruddler.mitre.org:8081 How do I authenticate this connection ?

    Read the article

  • How to display icons next to a select1 control with xxforms:tree appearance

    - by user557060
    Hi, I display a list of items via select1 control using xxforms:tree appearance. They are displayed via a code block like: <xforms:itemset nodeset="instance('dataInstance')/*"> <xforms:label ref="fn:concat(./NAME,', ','ID: ',./ID)"/> <xforms:value ref="./ID"/> </xforms:itemset> </xforms:select1> I want to display two icons for each item on the same row as the item: one icon for deleting and one for editing that item, which would all invoke XPL with the item ID as the parameter. The question, how do I render those icons - does itemset support nested trigger elements? If not, how do I go about achieving it (clicking on the item results in an action other than edit or delete, so cannot use that; can show delete/edit on the page shown when user clicks on the item, but want to save that one click if the user just wants to delete the item for example). Thanks.

    Read the article

  • Is it appropriate to use non-ASCII (natural-language) XML tags?

    - by Vladimir Alexiev
    Is it appropriate to use XML tags (element names) written in non-ASCII natural languages? The XML spec allows it (see Names and Exceptions), but I couldn't find any best practices about this at W3C and related pages. What I'm looking for is practical advice regarding which tools support this, whether important XML-related technologies such as XSLT and XForms may have problems with it, etc.

    Read the article

  • Web Forms 2.0: Editor & Libraries

    - by lacco
    Hi! I would like to build a web application where users can create forms with very few technical knowledge. Since they need "advanced" features like validations, required fields and some more, I am currently evaluating XForms and web forms 2.0 (from HTML 5 spec). Concerning web forms, my research couldn't find any answers for the following questions: Are there any (JavaScript) libraries out there which make web forms fully available in browsers which have currently no support for them (i.e. Firefox)? Is there a "web forms editor" which allows creating input and select fields, with setting attributes like the type, required, ...? It has to be something visual, and must create "nice" html. Any help/ hints would be appreciated!

    Read the article

  • Which external DSLs do you like to use?

    - by Max Toro
    The reason I'm asking is because right now there seems to be tendency to make DSLs internal. One example is LINQ in C# and VB. You can use it against in-memory objects, or you can use it as a replacement of SQL or other external DSL. Another example is HTML5 vs XHTML2. XHTML2 supported decentralized extensibility through namespaces, in other words you embed external DSL code (XForms, SVG, MathML, etc.) in your XHTML code. Sadly HTML5 doesn't seem to have such mechanism, instead new features are internal (e.g. <canvas> instead of SVG). I'd like to know what other developers think about this. Do you like using external DSLs ? Which ones ? If not, why ?

    Read the article

  • orbean forms bulder + custom persistance api: Why does it call /crud/.../data/data.xml?

    - by yankee
    I am currently implementing my own persistence layer for orbeon forms. As far as I have understood the virtual hierachy of data, creating a form with form builder in the application "myapp" with the name "myform" should cause the form builder to call /crud/myapp/myform/form/form.xhtml, passing the newly created form as HTTP-PUT data. Thus I created a spring method annotated with: @RequestMapping(method = RequestMethod.PUT, value = "/crud/{applicationName}/{formName}/form/form.xhtml") public void saveForm(@PathVariable String formName, @RequestBody String putData) I expected this method to be called with my form. But this method does not get called. Instead the method @RequestMapping(method = RequestMethod.PUT, value = "/crud/{applicationName}/{formName}/data/{uuid}/data.xml") public void saveInstance(@PathVariable String uuid, @RequestBody String putData) gets called. Put data contains the full xhtml form. Why is this happening? I thought that the second URL would only be called for saving an instance, more specifically the <xforms:instance id="fr-form-instance"> part of a form, once I fill in values for a form.

    Read the article

  • How to feed an xml database with tags obtained thru html forms ?

    - by blaise1
    Hello! Not a programmer, I begin with xml, html forms and xslt on Mac. I plan to use a form to post short texts in a xhtml page and invite end users to add some annotations to the said text. The users would select a specific part of the text posted and each annotation would stand for one specific chain of characters. My goal is to consolidate the tags obtained from various user's annotations to one xml "knowledge base" containing the original text with all the revision indicators. Then I plan to use xslt sheets to product various reports based on the tags obtained. my two questions are : 1- am I dreaming ? Is it really possible to do that with xml, xforms, xslt without using java, php, ajax or other seasoned programmer's tools ? 2- What should be my focus for further explorations aiming in that direction ? Which schema, events, sequences should I study ? Je vous remercie à l'avance, Please excuse my English. Blaise

    Read the article

1