I'm having trouble getting something to work. I'm trying to build a
form that allows the user to query for an existing Person to link to
the entity being edited. The way I envision it working is as follows:
The snippet of what I have for the table is this: When I press the "Select" button, I think it should be copying one of the rows from this list of authorities:<xforms:repeat nodeset="instance('authorities')/auth:Authority"> <tr> <td><xforms:trigger> <xforms:label>Select</xforms:label> <xforms:action ev:event="DOMActivate"> <!-- Insert into main document and toggle --> <xforms:insert context="instance('new-authority')" nodeset="auth:Authority" origin="." /> <xforms:toggle case="not-changing" /> </xforms:action> </xforms:trigger></td> <td><xforms:output ref="rdfs:label" /></td> <td><xforms:output ref="@mdp:id" /></td> </tr> </xforms:repeat> into this temporary instance:<xforms:instance id="authorities"> <DefaultViewpoint:Default_root> <auth:Authority mdp:id="http://www.modeldriven.org/2008/ArchitectureOntology/Samples/SampleVersions.owl#Cory"> <rdfs:label>Cory</rdfs:label> </auth:Authority> <auth:Authority mdp:id="http://www.modeldriven.org/2008/ArchitectureOntology/Samples/SampleVersions.owl#Jim"> <rdfs:label>Jim</rdfs:label> </auth:Authority> <auth:Authority mdp:id="http://www.modeldriven.org/2008/ArchitectureOntology/Samples/SampleVersions.owl#Jeff"> <rdfs:label>Jeff</rdfs:label> </auth:Authority> </DefaultViewpoint:Default_root> </xforms:instance> but the instance inspector tells me I'm getting this instead:<xforms:instance id="new-authority"> <auth:responsible_party> <auth:Authority mdp:id="TBD"> <rdfs:label>TBD</rdfs:label> </auth:Authority> </auth:responsible_party> </xforms:instance> It looks like it is copying from the temporary instance back into itself!<auth:responsible_party> <auth:Authority mdp:id="TBD"> <rdfs:label>TBD</rdfs:label> </auth:Authority> <auth:responsible_party> <auth:Authority mdp:id="TBD"> <rdfs:label>TBD</rdfs:label> </auth:Authority> </auth:responsible_party> </auth:responsible_party> Could someone please tell me what I'm doing wrong? Also, does anyone have a better way to query for an entity to link to the entity being edited than what I've described in the bullets above? Thanks, -Jim -- 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 |
Jim Logan wrote:
Aha! I finally got this to work by replacing the origin with origin="instance('authorities')/auth:Authority[xxforms:index()]"That gives me the node that corresponds to the button in the table. I didn't realize the context affected the origin as well! I'm still curious about the following, though: Also, does anyone have a better way to query for an entity to link to the entity being edited than what I've described in the bullets above?Is there an example of querying for an entity to the entity being edited somewhere? Am I the only person who needs to do this kind of thing? Thanks, -Jim -- 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
|
Hi Jim,
On Fri, May 30, 2008 at 2:34 PM, Jim Logan <[hidden email]> wrote: > I'm still curious about the following, though: > > Also, does anyone have a better way to query for an entity to link to the > entity being edited than what I've described in the bullets above? > > Is there an example of querying for an entity to the entity being edited > somewhere? Am I the only person who needs to do this kind of thing? I often see this type of UI being used, and what you described seems entirely reasonable to me. Sometime the part of the UI that allows users to do the search and that displays the results from the search is shown in a dialog (xxforms:dialog), so it doesn't interfere with the rest of the of the page. Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ Twitter - http://twitter.com/avernet -- 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 |