Unable to Toggle Case

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

Unable to Toggle Case

Hank Ratzesberger-3
Hello,

I create a trigger in a repeat.  It attempts to show a dialog and
toggle to active case to one with a form for that kind of "item"

However, I cannot make the case toggle.  The first in the switch is visible.

Do the toggle's need to be within the switch? thanks

<xf:repeat nodeset="/databaseChangeLog/changeSet" id="change-sets">
    <xh:tr>
        <xh:td>
            <xf:var name="change-case" value="concat('case-',name(child::*))"/>
            <xf:output value="$change-case"/>
            <xf:trigger>
                <xf:label>Edit</xf:label>
                <xf:action ev:event="DOMActivate">
                    <xxf:show dialog="edit-dialog"/>
                    <xf:toggle case="$change-case"/>
                </xf:action>
            </xf:trigger>
        </xh:td>


Later in the file, I define the switch:

<xxf:dialog id="edit-dialog" appearance="full" level="modeless"
                close="true" draggable="true" visible="false">
    <xf:label>ChangeSet Editing</xf:label>

    <xf:switch>

        <xf:case id="case-autoIncrement">
            <xf:group>
                <xf:label>AutoIncrement</xf:label>
                <p> </p>
            </xf:group>
        </xf:case>

--Hank

--
Hank Ratzesberger
XMLWerks.com

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Unable to Toggle Case

Erik Bruchez
Administrator
> Do the toggle's need to be within the switch?

No, it can be outside of it.

The issue is that the @case attribute takes a literal case id. Try instead:

    <xf:toggle case="{$change-case}"/> 

or:

    <xf:toggle case="case-{name(*)}"/> 

-Erik
Reply | Threaded
Open this post in threaded view
|

Re: Unable to Toggle Case

Hank Ratzesberger-3
Aha, thanks Erik.

This works:

<xf:toggle case="case-{name(child::*)}"/>


On Fri, Jan 2, 2015 at 4:55 PM, Erik Bruchez <[hidden email]> wrote:

>> Do the toggle's need to be within the switch?
>
> No, it can be outside of it.
>
> The issue is that the @case attribute takes a literal case id. Try instead:
>
>     <xf:toggle case="{$change-case}"/>
>
> or:
>
>     <xf:toggle case="case-{name(*)}"/>
>
> -Erik
>
> --
> View this message in context: http://discuss.orbeon.com/Unable-to-Toggle-Case-tp4659387p4659395.html
> Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.
>
> --
> You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].



--
Hank Ratzesberger
XMLWerks.com

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Unable to Toggle Case

Erik Bruchez
Administrator
Cool, thanks for confirming. -Erik