"xforms-value-changed" help needed

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

"xforms-value-changed" help needed

Park, Michael

I’m hoping someone can help with this.  It’s a 2 tier select inside a repeat:

 

The user selects from a list to get a list.  When they decide to change their selection in the first list I need to set the value of the second list to an empty string.  This works by using an “xforms-value-changed”.  But, when I delete a row, the delete throws an undesired “xforms-value-changed” event.  So it is clearing the second list when it shouldn’t.  This is related to an older post of mine:  http://www.nabble.com/xforms-value-changed-bug-to14160197.html#a17699315/

 

Any help would be greatly appreciated!  I’ve attached the working code and pasted the bulk of the code below.

 

Thanks,

Mike

 

 

<xforms:repeat nodeset="instance('genres')/mods:genre[position()]" id="repeat">

   <xxforms:variable name="genre-position" select="position()"/>                                                       

   <p>

      <xforms:trigger appearance="minimal" ref="self::node()">

         <xforms:label>Remove</xforms:label>

         <xforms:delete ev:event="DOMActivate" nodeset="self::node()" />                                                                                                                                                

      </xforms:trigger>

               

      <xforms:select1 ref="@authority">

         <xforms:label>Authority</xforms:label>

            <xforms:itemset nodeset="instance('choices')/authority">

               <xforms:label ref="@label"/>

               <xforms:value ref="@value"/>

            </xforms:itemset>           

            <xforms:setvalue ev:event="xforms-value-changed" ref="instance('genres')/mods:genre[$genre-position]" value="''"/>                                                                                                      

      </xforms:select1>

      <xforms:select1 ref=".">

         <xforms:label>Genre </xforms:label>

         <xforms:itemset nodeset="instance('genre-select')/genre[@auth = instance('genres')/mods:genre[$genre-position]/@authority]">

            <xforms:label ref="@label"/>

            <xforms:value ref="@value"/>

         </xforms:itemset>

      </xforms:select1>

   </p>

</xforms:repeat>



--
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

test.xhtml (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: "xforms-value-changed" help needed

Park, Michael

The latest version of Orbeon supports “xforms-select” - this solves my problem!

 


From: Park, Michael [mailto:[hidden email]]
Sent: Monday, June 09, 2008 4:58 PM
To: [hidden email]
Subject: [ops-users] "xforms-value-changed" help needed

 

I’m hoping someone can help with this.  It’s a 2 tier select inside a repeat:

 

The user selects from a list to get a list.  When they decide to change their selection in the first list I need to set the value of the second list to an empty string.  This works by using an “xforms-value-changed”.  But, when I delete a row, the delete throws an undesired “xforms-value-changed” event.  So it is clearing the second list when it shouldn’t.  This is related to an older post of mine:  http://www.nabble.com/xforms-value-changed-bug-to14160197.html#a17699315/

 

Any help would be greatly appreciated!  I’ve attached the working code and pasted the bulk of the code below.

 

Thanks,

Mike

 

 

<xforms:repeat nodeset="instance('genres')/mods:genre[position()]" id="repeat">

   <xxforms:variable name="genre-position" select="position()"/>                                                       

   <p>

      <xforms:trigger appearance="minimal" ref="self::node()">

         <xforms:label>Remove</xforms:label>

         <xforms:delete ev:event="DOMActivate" nodeset="self::node()" />                                                                                                                                                

      </xforms:trigger>

               

      <xforms:select1 ref="@authority">

         <xforms:label>Authority</xforms:label>

            <xforms:itemset nodeset="instance('choices')/authority">

               <xforms:label ref="@label"/>

               <xforms:value ref="@value"/>

            </xforms:itemset>           

            <xforms:setvalue ev:event="xforms-value-changed" ref="instance('genres')/mods:genre[$genre-position]" value="''"/>                                                                                                      

      </xforms:select1>

      <xforms:select1 ref=".">

         <xforms:label>Genre </xforms:label>

         <xforms:itemset nodeset="instance('genre-select')/genre[@auth = instance('genres')/mods:genre[$genre-position]/@authority]">

            <xforms:label ref="@label"/>

            <xforms:value ref="@value"/>

         </xforms:itemset>

      </xforms:select1>

   </p>

</xforms:repeat>



--
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