Hai All
I am trying to develop a Smartkit for my Project.I am able to delete the data from Instance by using <xforms:delete> on Client side.I am added <xforms:insert> for adding the data to my page .When i clicks add button it will add a templete to my original instance as in Book-cast example.But the problem is entering the field values to that.I have written some code like this by using the index property.But when i am using this ,at index one only it making all fields editable,at other indexes it making it non editable.
i have tried with <xxforms:when> and <xxforms:choose> but i am getting error like invalid data element xxforms:if and xxforms:when.
Please give me a solution for this.
Thanks in advance.
My code is
< xforms:repeat ....................................... id="emp-repeat">< xforms:group ref=".[index('emp-repeat') != position()]"> <xforms:output ref="code"/> </xforms:group> <xforms:group ref=".[index('emp-repeat') = position()]"> <xforms:input ref="code"/> </xforms:group>.................. . . . . . . Like this i am trying to edit the selected index elements. THANKS & REGARDS
SATHISH K MITTAPELLI
Unlimited freedom, unlimited storage. Get it now -- 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 sathish,
> <xforms:repeat ....................................... id="emp-repeat"> could you please post a complete example that runs in the sandbox? It's easier to debug if there's a complete xforms document with the instance data... Thanks! florian -- 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 |
In reply to this post by Sathish K Mittapelli
Hai Florian Schmitt ...this is my complete code.......
< html xmlns="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <head> <title><h1>Employee Details Display</h1></title> <xforms:model> <xforms:instance id="main"> <xi:include href="input:data"/> </xforms:instance><xforms:instance id="emp-template"> <employee xmlns=""> <code/> <firstName/> <lastName/> <dob/> <gender/> <address/> <phone/> <select/> </employee> </xforms:instance> </head><body> <form name="employee"> </ table>< br /><br />< div align="cenetr"> <table> <tr> <td> <xforms:trigger> <xforms:label>Add Employee</xforms:label> <xforms:insert ev:event="DOMActivate" context="instance('main')" nodeset="employee" at="index('emp-repeat')" position="after" origin="instance('emp-template')"/> </xforms:trigger> </td> <td> <xforms:trigger> <xforms:label>Remove Employee</xforms:label> <xforms:delete ev:event="DOMActivate" context="instance('main')" nodeset="employee" at="index('emp-repeat')"/> </xforms:trigger> </td> <td> <xforms:submit submission="CreateQuestion"> <xforms:label>Submit</xforms:label> </xforms:submit> </td> </tr> </table></ div> <widget:xforms-instance-inspector xmlns:widget="http://orbeon.org/oxf/xml/widget"/> </form> </body> </html>Here data coming from xpl.
THANKS & REGARDS
SATHISH K MITTAPELLI
----- Original Message ---- From: Florian Schmitt <[hidden email]> To: [hidden email] Sent: Wednesday, 30 April, 2008 2:26:52 PM Subject: [ops-users] Re: Problem with <xforms:group>.... Hi sathish, > <xforms:repeat ....................................... id="emp-repeat"> could you please post a complete example that runs in the sandbox? It's easier to debug if there's a complete xforms document with the instance data... Thanks! florian Meet people who discuss and share your passions. Join them now. -- 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 sathish,
> Here data coming from xpl. thank you, but it won't run in the sandbox without the instance data. How would the instance data look like? florian -- 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 |
Unlimited freedom, unlimited storage. Get it now -- 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 |
Administrator
|
In reply to this post by Sathish K Mittapelli
The position() function will always return 1 in your case.
This is an XPath thing: position() returns the position within the current context. As soon as you write: .[ ... whatever ... ] the context within the brackets changes to being the current node. That context has a size of 1, and a position of 1. This probably explains part of your problem. You may want to replace "position()" with "count(preceding-sibling::*) + 1". -Erik On Apr 30, 2008, at 1:06 AM, sathish kumar wrote: > Hai All > > I am trying to develop a Smartkit for my Project.I am able to delete > the data from Instance by using <xforms:delete> on Client side.I am > added <xforms:insert> for adding the data to my page .When i clicks > add button it will add a templete to my original instance as in Book- > cast example.But the problem is entering the field values to that.I > have written some code like this by using the index property.But > when i am using this ,at index one only it making all fields > editable,at other indexes it making it non editable. > i have tried with <xxforms:when> and <xxforms:choose> but i am > getting error like invalid data element xxforms:if and xxforms:when. > > Please give me a solution for this. > Thanks in advance. > > My code is > <xforms:repeat ....................................... id="emp- > repeat"> > > > <xforms:group ref=".[index('emp-repeat') != position()]"> > > <xforms:output ref="code"/> > > </xforms:group> > > > <xforms:group ref=".[index('emp-repeat') = position()]"> > > <xforms:input ref="code"/> > > </xforms:group> > > .................. > > . > > . > > . > > . > > . > > . > > Like this i am trying to edit the selected index elements. > > > > THANKS & REGARDS > SATHISH K MITTAPELLI > > Unlimited freedom, unlimited storage. Get it now > -- > 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 Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 |