Re this DMV Forms Example, in the section -
Vehicles, Vessels, or Placards Owned By You It only seems to allow 3 vehicles. I'm basing my own work for a project, on this DMV example, but don't want to restrict the length of the list. I'm not sure quite how this code works and how I can remove this restriction. Also if I delete the last of the 3 in the list, and then add one, it adds this to the middle 2nd item. I would expect it to add it at the end. Do you know when the DMV tutorial is due out please. Thank You Peter Hale -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Hi Peter,
The add and delete buttons are part of the 'control-instance' and if you look in the model you will find the following binds on this instance: <xforms:bind nodeset="instance('control-instance')"> <!-- snipped --> <xforms:bind nodeset="vehicle-insert-trigger" readonly="count(instance('main-instance')//dmv:vehicles/dmv:vehicle) >= 3"/> <xforms:bind nodeset="vehicle-delete-trigger" readonly="count(instance('main-instance')//dmv:vehicles/dmv:vehicle) < 2"/> <!-- snipped --> </xforms:bind> which make the add control read-only when there is at least 3 dmv:vehicle elements and the delete control read-only when only one dmv:vehicle element left. You just have to remove those binds to remove the restriction. Concerning the addition after a delete of the last line it works fine for me with OPS 3.0.1 and the online example: http://www.orbeon.com/ops/goto-example/forms HTH, Jimmy [hidden email] wrote: > Re this DMV Forms Example, in the section - > > Vehicles, > Vessels, or > Placards > Owned By You > > It only seems to allow 3 vehicles. I'm basing my own work for a project, on this DMV example, but don't want to restrict the length of the list. I'm not sure quite how this code works and how I can remove this restriction. Also if I delete the last of the 3 in the list, and then add one, it adds this to the middle 2nd item. I would expect it to add it at the end. > > Do you know when the DMV tutorial is due out please. > > Thank You > > Peter Hale > > -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by peter2.hale
Peter,
The limitation to 3 rows is a feature of this example, because the underlying PDF form only has room for 3 rows. You don't have, obviously, a limitation on the number of rows you can repeat in a form. This example adds a new row always after the currently selected row. If you delete the last row, the second row becomes selected. Adding a row then adds the 3rd row again. So I don't see the behavior you are describing. Check out the TODO Lists example for an example that has unlimited and nested repeats. We don't have an ETA yet regarding the tutorial. But keep posting questions in ops-users, and check the source code for the example. Best, -Erik [hidden email] wrote: > Re this DMV Forms Example, in the section - > > Vehicles, > Vessels, or > Placards > Owned By You > > It only seems to allow 3 vehicles. I'm basing my own work for a project, on this DMV example, but don't want to restrict the length of the list. I'm not sure quite how this code works and how I can remove this restriction. Also if I delete the last of the 3 in the list, and then add one, it adds this to the middle 2nd item. I would expect it to add it at the end. > > Do you know when the DMV tutorial is due out please. > > Thank You > > Peter Hale Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |