Bollywood, fun, friendship, sports and more. You name it, we have it. -- 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 Satish,
I don't have enough experience to know if xforms or Orbeon Forms will do exactly what you want, but.... Is it possible to use rows inputs whose data is readonly? I.e., the readonly appearance of a control? Clicking on an edit trigger, one for each row, would make the inputs become editable by changing the value the data model was bound to. As I understand, you don't want all the rows to be editable, only the selected one, but the switch reveals the edit form, with rows of inputs. A small example of what I mean: http://www.orbeon.com/ops/xforms-sandbox/sample/date Regards, Hank On May 8, 2008, at 10:54 PM, sathish kumar wrote: > > Hai All, > in my code i am trying to edit a particular row field when i click > edit button. my code look like this. > > <xforms:instance id="main"> > > <employee xmlns=""> > <code/> > <firstName/> > <lastName/> > <dob/> > <gender/> > <address/> > <phone/> > <select/> > </employee> > > > </xforms:instance> > . > . > . > . > <xforms:switch> > > <xforms:case id="display" selected="true"> > <xforms:repeat nodeset="instance('main')/employee[ceiling > (position() div number(instance('pagination')/rows-size)) ge number > (instance('pagination')/page-num) and ceiling(position() div number > (instance('pagination')/rows-size)) lt (number(instance > ('pagination')/page-num)+1)]"> > <tr> > > <td> > <xforms:select ref="select" appearance="full"> > <xforms:item> > <xforms:label></xforms:label> > <xforms:value>Hai </xforms:value> > </xforms:item> > </xforms:select> > </td> > <td> > <xforms:output id="cod1" ref="code"/> > </td> > > <td> > <xforms:output ref="firstName"/> > </td> > > <td> > <xforms:output ref="lastName"/> > </td> > > <td> > <xforms:output ref="dob"/> > </td> > > <td> > <xforms:output ref="gender"/> > </td> > > <td> > <xforms:output ref="address"/> > </td> > <td> > <xforms:output ref="phone"/> > </td> > > </tr> > </xforms:repeat> > </xforms:case> > > <xforms:case id="edit" selected="false"> > <xforms:repeat nodeset="instance('main')/employee[ceiling > (position() div number(instance('pagination')/rows-size)) ge number > (instance('pagination')/page-num) and ceiling(position() div number > (instance('pagination')/rows-size)) lt (number(instance > ('pagination')/page-num)+1)]" id="emp-repeat"> > <tr> > > <td> > <xforms:select ref="select" appearance="full"> > <xforms:item> > <xforms:label></xforms:label> > <xforms:value>Hai </xforms:value> > </xforms:item> > </xforms:select> > </td> > <td> > <xforms:group ref=".[index('emp-repeat')!= (count > (preceding-sibling::*) + 1)]"> > <xforms:output ref="code"/> > </xforms:group> > <xforms:group ref=".[index('emp-repeat')= (count > (preceding-sibling::*) + 1)]"> > <xforms:input ref="code"/> > </xforms:group> > </td> > > <td> > <xforms:group ref=".[index('emp-repeat')!= (count > (preceding-sibling::*) + 1)]"> > <xforms:output ref="firstName"/> > </xforms:group> > <xforms:group ref=".[index('emp-repeat')= (count > (preceding-sibling::*) + 1)]"> > <xforms:input ref="firstName"/> > </xforms:group> > </td> > > <td> > <xforms:group ref=".[index('emp-repeat')!= (count > (preceding-sibling::*) + 1)]"> > <xforms:output ref="lastName"/> > </xforms:group> > <xforms:group ref=".[index('emp-repeat')= (count > (preceding-sibling::*) + 1)]"> > <xforms:input ref="lastName"/> > </xforms:group> > </td> > > <td> > <xforms:group ref=".[index('emp-repeat')!= (count > (preceding-sibling::*) + 1)]"> > <xforms:output ref="dob"/> > </xforms:group> > <xforms:group ref=".[index('emp-repeat')= (count > (preceding-sibling::*) + 1)]"> > <xforms:input ref="dob"/> > </xforms:group> > </td> > > <td> > <xforms:group ref=".[index('emp-repeat')!= (count > (preceding-sibling::*) + 1)]"> > <xforms:output ref="gender"/> > </xforms:group> > <xforms:group ref=".[index('emp-repeat')= (count > (preceding-sibling::*) + 1)]"> > <xforms:input ref="gender"/> > </xforms:group> > </td> > > <td> > <xforms:group ref=".[index('emp-repeat')!= (count > (preceding-sibling::*) + 1)]"> > <xforms:output ref="address"/> > </xforms:group> > <xforms:group ref=".[index('emp-repeat')= (count > (preceding-sibling::*) + 1)]"> > <xforms:input ref="address"/> > </xforms:group> > </td> > <td> > <xforms:group ref=".[index('emp-repeat')!= (count > (preceding-sibling::*) + 1)]"> > <xforms:output ref="phone"/> > </xforms:group> > <xforms:group ref=".[index('emp-repeat')= (count > (preceding-sibling::*) + 1)]"> > <xforms:input ref="phone"/> > </xforms:group> > </td> > > </tr> > </xforms:repeat> > </xforms:case> > </xforms:switch> > > i have used repeat because my data coming from a database.I have > written a edit trigger such that the edit case activates.But in my > edit case i have written logic such that the selected index row > will become editable. > But i am trying to change the logic such that when i click edit > button after selecting a particular row(index) only that field have > to become editable. > > i have written edit trigger as follows. > > <xforms:trigger> > <xforms:label>Edit Employee</xforms:label> > <xforms:toggle ev:event="DOMActivate" > case="edit"/> > > </xforms:trigger> > > What are the changes to be made to my code to reach my > requirements.Please help me . > Thanks in advance. > > > THANKS & REGARDS > SATHISH K MITTAPELLI > > Bollywood, fun, friendship, sports and more. You name it, we have it. > > -- > 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 NEES@UCSB Institute for Crustal Studies, University of California, Santa Barbara 805-893-8042 -- 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 |