x-form Edit

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

x-form Edit

rameshkancherla
Hi,

      This is Ramesh. I am implementing orbeon x-forms in my application. I am getting nodes from xml file and displying that nodes into x-form as a records. when user select particular record then i have to edit that record values into one x-form. i am new to x-forms. i am not understanding how to do it.

if any one know  can you please give me suggestion.


Thanks & Regards
Ramesh K
Reply | Threaded
Open this post in threaded view
|

Re: x-form Edit

venkata subrahmanyam

rameshkancherla wrote
Hi,

      This is Ramesh. I am implementing orbeon x-forms in my application. I am getting nodes from xml file and displying that nodes into x-form as a records. when user select particular record then i have to edit that record values into one x-form. i am new to x-forms. i am not understanding how to do it.

if any one know  can you please give me suggestion.


Thanks & Regards
Ramesh K

You can use a new tag like <selectedrecord> and set its value when the edit action happened.
1) If you are using <xforms:repeat> you can set it's value as

<xforms:setvalue ref="instance(main-instance')/selectedrecord" value="instance('main-instance')/data/records/record[index('myrepeat')]/empid"></xforms:setvalue>

2) If you are using <xsl:for-each >
<forms:setvalue ref="instance(main-instance')/selectedrecord"><xsl:value-of select="/empid"/></xforms:setvalue> 

                                                               
once submission is done you can get the records of selected empid only.