Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newly-relevant controls after repeat fail to update #3976

Closed
ebruchez opened this issue Mar 8, 2019 · 4 comments

Comments

1 participant
@ebruchez
Copy link
Collaborator

commented Mar 8, 2019

  • make minimal repro case

+1 from customer

@ebruchez ebruchez self-assigned this Mar 8, 2019

@ebruchez ebruchez added this to To review in Orbeon Forms 2019.1 via automation Mar 8, 2019

@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 8, 2019

Doesn't happen with xxf:xpath-analysis="false".

@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 8, 2019

Here is a minimal case:

<xh:html
    xmlns:xh="http://www.w3.org/1999/xhtml"
    xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
    xmlns:xf="http://www.w3.org/2002/xforms">

    <xh:head>
        <xf:model id="my-model" xxf:xpath-analysis="true">
            <xf:instance id="my-instance">
                <form>
                    <show>false</show>
                    <my-group>
                        <my-repeat/>
                    </my-group>
                </form>
            </xf:instance>
            <xf:bind
                id="my-group-bind"
                ref="my-group"
                relevant="../show = 'true'"/>
        </xf:model>
    </xh:head>
    <xh:body>
        <xf:select1 id="my-select1" appearance="full" ref="show">
            <xf:item>
                <xf:label>False</xf:label>
                <xf:value>false</xf:value>
            </xf:item>
            <xf:item>
                <xf:label>True</xf:label>
                <xf:value>true</xf:value>
            </xf:item>
        </xf:select1>
        <xf:group id="my-group" ref="my-group">
            <xf:output id="my-output-41" value="41"/>
            <xf:repeat id="my-repeat" ref="my-repeat"/>
            <xf:output id="my-output-42" value="42"/>
        </xf:group>
    </xh:body>
</xh:html>

When showing the group:

  • The first <xf:output> expression shows as expected.
  • The second <xf:output> expression doesn't show with xxf:xpath-analysis="true".
  • But it shows with xxf:xpath-analysis="false".
  • It also shows if <xf:repeat> is removed.
  • It also shows if <xf:repeat> is replaced with <xf:group>.
@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 8, 2019

Or by showing the group on xforms-ready.

<xh:html
    xmlns:xh="http://www.w3.org/1999/xhtml"
    xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
    xmlns:xf="http://www.w3.org/2002/xforms">

    <xh:head>
        <xf:model id="my-model" xxf:xpath-analysis="true">
            <xf:instance id="my-instance">
                <form>
                    <show>false</show>
                    <my-group>
                        <my-repeat/>
                    </my-group>
                </form>
            </xf:instance>
            <xf:bind
                id="my-group-bind"
                ref="my-group"
                relevant="../show = 'true'"/>
            <xf:setvalue
                event="xforms-ready"
                ref="show"
                value="true()"/>
        </xf:model>
    </xh:head>
    <xh:body>
        <xf:group id="my-group" ref="my-group">
            <xf:output id="my-output-41" value="41"/>
            <xf:repeat id="my-repeat" ref="my-repeat"/>
            <xf:output id="my-output-42" value="42"/>
        </xf:group>
    </xh:body>
</xh:html>

@ebruchez ebruchez changed the title Control label not appearing after repeat in some cases Newly-relevant controls after repeat fail to update Mar 8, 2019

@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 8, 2019

This was happening because of an incorrect decrement of the level in BindingUpdater.

@ebruchez ebruchez closed this in eb087b2 Mar 8, 2019

@ebruchez ebruchez added this to Done in Orbeon Forms 2017.2.3 via automation Mar 8, 2019

Orbeon Forms 2019.1 automation moved this from To review to Done Mar 8, 2019

@ebruchez ebruchez added this to Todo in Orbeon Forms 2018.1.4 via automation Mar 8, 2019

@ebruchez ebruchez moved this from Todo to Done in Orbeon Forms 2018.1.4 Mar 8, 2019

@ebruchez ebruchez added this to To do in Orbeon Forms 2018.2.3 via automation Mar 8, 2019

@ebruchez ebruchez moved this from To do to Done in Orbeon Forms 2018.2.3 Mar 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.