Quantcast

Change elements of a nodeset repeater (XForms/betterFORM)

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

Change elements of a nodeset repeater (XForms/betterFORM)

Felix Maas
Dear Sir or Madame,
 
I use XForms with the betterFORM processor and I have the following problem. I want to change the content of an element of a selected entry in a nodeset repeat and one entry of the following element by clicking a button.
That does work as long as I do not add a condition (e.g. by adding the tag <xf:group>). The path is definitely correct. Is the problem known and is there a solution for that?
The following code snippet shows the relevant part. As I said: if I delete the <xf:group> tag it works!
 
   <xf:trigger>
        <xf:label>Change state</xf:label>
        <xf:group ref=".[//project[index('project-repeat')]/activity[index('activity-repeat')]/state eq 'in process']">
            <xf:action>
                <xf:setvalue ref="//project[index('project-repeat')]/activity[index('activity-repeat')]/state">finished</xf:setvalue>
            </xf:action>
            <xf:action>
                <xf:setvalue ref="//project[index('project-repeat')]/activity[index('activity-repeat') + 1]/state">in process</xf:setvalue>
            </xf:action>
        </xf:group>
    </xf:trigger>
 
Best regards,
Felix

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Change elements of a nodeset repeater (XForms/betterFORM)

Joern Turner-4
no,

no general problem known here but a snippet of a form is hardly enough to tell. E.g. what is the '.' context node here.

For a better answer please always provide a complete (probably broken down) form - otherwise it's hard to tell what the problem is.

Joern

On Sun, Mar 12, 2017 at 12:02 PM, Felix Maas <[hidden email]> wrote:
Dear Sir or Madame,
 
I use XForms with the betterFORM processor and I have the following problem. I want to change the content of an element of a selected entry in a nodeset repeat and one entry of the following element by clicking a button.
That does work as long as I do not add a condition (e.g. by adding the tag <xf:group>). The path is definitely correct. Is the problem known and is there a solution for that?
The following code snippet shows the relevant part. As I said: if I delete the <xf:group> tag it works!
 
   <xf:trigger>
        <xf:label>Change state</xf:label>
        <xf:group ref=".[//project[index('project-repeat')]/activity[index('activity-repeat')]/state eq 'in process']">
            <xf:action>
                <xf:setvalue ref="//project[index('project-repeat')]/activity[index('activity-repeat')]/state">finished</xf:setvalue>
            </xf:action>
            <xf:action>
                <xf:setvalue ref="//project[index('project-repeat')]/activity[index('activity-repeat') + 1]/state">in process</xf:setvalue>
            </xf:action>
        </xf:group>
    </xf:trigger>
 
Best regards,
Felix

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Loading...