Hello,
I am quite novice to XForms. Now I would like to pre-set the value of an <xforms:input /> field. As far as I read, I must bind the field to a model element using either the ref or the bind attribute. Unfortunately, I cannot use the ref because I already use that to save the results to the output model: <xforms:input incremental="true" model="outputModel" ref="BBDemoSchema:CUSTOMER_NAME"/> You can find the corresponding model below the mail. I guess the solution must be using the bind attribute. But that is a bit tricky: the corresponding data is also called CUSTOMER_NAME. It resides in the very same namespace. How can I trick that? How can I set the initial value from the input CUSTOMER_NAME, and set the result to the other one? Best Regards, Tamas <xforms:model> <xforms:instance> <BBDemoSchema:MeetCustomerResponse xsi="http://www.w3.org/2001/XMLSchema-instance"/> </xforms:instance> <xforms:bind nodeset="."> <xforms:bind nodeset="BBDemoSchema:CUSTOMER_NAME" xforms:required="true()" xforms:type="xsd:string"/> <xforms:bind nodeset="BBDemoSchema:NET_INCOME" xforms:required="true()" xforms:type="xsd:integer"/> <xforms:bind nodeset="BBDemoSchema:LOAN_AMOUNT" xforms:required="true()" xforms:type="xsd:integer"/> <xforms:bind nodeset="BBDemoSchema:REAL_ESTATE_ADDRESS" xforms:required="true()" xforms:type="xsd:string"/> <xforms:bind nodeset="BBDemoSchema:TaskOwner" xforms:required="true()" xforms:type="xsd:string"/> </xforms:bind> <xforms:submission action="" method="post"/> </xforms:model> -- 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 |
Tamas,
If I read correctly, it looks like you think the initial value for a control could be read from instance node A while populating node B of the (or a different one) instance with a submitted value. I do not think this makes much sense from modeling point of view - there should be just a single instance node used for both "tasks". What does make sense though is to populate default values of instance dynamically upon (say) form load. A. On Apr 23, 2009, at 5:52 PM, REV Tamas wrote: Hello, -- 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 |
Hi Alexander,
This thing that the initial value of a control is being read from node A - that belongs to the model inputModel - while populating node B - that belongs to outputModel - does make sense in Suns worklfow engine. The thing is that the initializing assignments can occur in a different layer from the Xfroms: I just assigned values to the nodes of the ouput mode. So this way I could initialze my forms. Thank you for your help! Thanks, Tamas On Thu, Apr 23, 2009 at 7:27 PM, Alexander Žaťko <[hidden email]> wrote:
-- 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 |
You can always use <xforms:setvalue/> to insert values into a node in the outputModel. Another option is to copy the values from inputModel into outputModel using <xforms:bind/> - that way your XForm could mirror (part of) the inputModel in the outputModel.
A. On Apr 24, 2009, at 12:26 PM, REV Tamas wrote: Hi Alexander, -- 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 |
Thanks!
2009/4/24 Alexander Žaťko <[hidden email]>
-- 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 |