Generating xml nodes in xforms:action in ops3.7

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

Generating xml nodes in xforms:action in ops3.7

Laxmi Narayana-3
Hi All,
 
I Need to generate xml nodes in xforms:action using <xsl:for-each>. I am trying to do as below but not able to
 
<xforms:group>
         <xforms:action ev:event="DOMActivate">
                 <xsl:for-each select="//filtertextfield">
                        <textfield>
                               <customfieldname>xsl:value-of select="filtercustomfieldlabel"/></customfieldname>
                               <customfieldvalue><xsl:value-of select="filtercustomfieldvalue"/></customfieldvalue>
                               <customfieldcondition><xsl:value-of select="filtercustomfieldcondition"/></customfieldcondition>
                        </textfield>
                   </xsl:for-each>
                   <xforms:send submission="execute-filter"/>
        </xforms:action>
        <xforms:trigger appearance="minimal" >
                   <xforms:label><xhtml:img src="/images/inbox/executeFilter.png" alt="Execute Filter"/></xforms:label>
        </xforms:trigger>
        <rebuild/>
</xforms:group>
 
 
Here  number of  textfield nodes comes from java class dynamically like below.
      <filtertextfield>
             <filtercustomfieldlabel/>
              <filtercustomfieldvalue/>
             <filtercustomfieldcondition/>
         </filtertextfield>
 
Now on click event in action filtertextfield nodes need to set textfield nodes like below.  
 
       <textfield>
             <customfieldlabel/>
              <customfieldvalue/>
             <customfieldcondition/>
         </textfield>
 
Can some body suggest me how to achieve the same.
 


Thanks in advance,
Laxmi Narayana.



--
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
Reply | Threaded
Open this post in threaded view
|

Re: Generating xml nodes in xforms:action in ops3.7

Alessandro Vernet
Administrator
Laxmi,

Laxmi Narayana wrote
I Need to generate xml nodes in xforms:action using <xsl:for-each>. I am
trying to do as below but not able to

<xforms:group>
         <xforms:action ev:event="DOMActivate">
                 <xsl:for-each select="//filtertextfield">
                        <textfield>
                               <customfieldname>xsl:value-of
select="filtercustomfieldlabel"/></customfieldname>
                               <customfieldvalue><xsl:value-of
select="filtercustomfieldvalue"/></customfieldvalue>
                               <customfieldcondition><xsl:value-of
select="filtercustomfieldcondition"/></customfieldcondition>
                        </textfield>
                   </xsl:for-each>
                   <xforms:send submission="execute-filter"/>
        </xforms:action>
        <xforms:trigger appearance="minimal" >
                   <xforms:label><xhtml:img
src="/images/inbox/executeFilter.png" alt="Execute Filter"/></xforms:label>
        </xforms:trigger>
        <rebuild/>
</xforms:group>
I am not sure what you are aiming for, but this <xsl:for-each> inside an <xforms:action> doesn't look right. The XSLT may not be running, but even if it runs, you'll be generating markup inside an <xforms:action> which isn't XForms, so it won't do anything. Maybe you want to set textfield/customfieldname when the trigger is activated, in which case you need to use an <xforms:setvalue>.

Alex