xd:preserve how it work? - InfoPath Dev
in

InfoPath Dev

xd:preserve how it work?

Last post 07-11-2005 12:09 AM by Coita Thierry. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-07-2005 12:47 AM

    xd:preserve how it work?

    Hi,

    I have carefully read your how-to about xd:preserve but I don't know how to apply this to my dropdownlistebox!

    Part of my view.xsl:

    <select class="xdComboBox xdBehavior_Select" title="" size="1" value="Präsident des Verwaltungsrates" xd:boundProp="value" xd:binding="my:Funktion" xd:xctname="DropDown" xd:CtrlId="CTRL971" tabIndex="0">
    <xsl:attribute name="style"><xsl:choose><xsl:when test="my:VR-AndereFunk = string(false())">DISPLAY: none</xsl:when></xsl:choose></xsl:attribute>
    <xsl:attribute name="value"><xsl:value-of select="my:Funktion"/></xsl:attribute>
    <xsl:choose>
    <xsl:when test="function-available('xdXDocument:GetDOM')">
    <option/>
    <xsl:variable name="val" select="my:Funktion"/>
    <xsl:if test="not(xdXDocument:GetDOM("getfonktion")/TabEigZb/EigZb[text=$val] or $val='')">
    <option selected="selected">
    <xsl:attribute name="value"><xsl:value-of select="$val"/></xsl:attribute>
    <xsl:value-of select="$val"/>
    </option>
    </xsl:if>
    <xsl:for-each select="xdXDocument:GetDOM("getfonktion")/TabEigZb/EigZb">
    <option>
    <xsl:attribute name="value"><xsl:value-of select="text"/></xsl:attribute>
    <xsl:if test="$val=text">
    <xsl:attribute name="selected">selected</xsl:attribute>
    </xsl:if>
    <xsl:value-of select="kurz"/>
    </option>
    </xsl:for-each>
    </xsl:when>
    <xsl:otherwise>
    <option>
    <xsl:value-of select="my:Funktion"/>
    </option>
    </xsl:otherwise>
    </xsl:choose>
    </select>


    Where I can declare my preserve code block ? I don't have any template, apply template or input?

    Thanks for your help

    Every moment hesitated is a moment gone for life!!! Think about it
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 07-07-2005 12:52 AM In reply to

    Re: xd:preserve how it work?

    I need of this for keep the line of the conditionnal formating! Because if I close and reopen my form the conditionnal formatting as disappear because this field is two times on my form!

    <xsl:attribute name="style"><xsl:choose><xsl:when test="my:VR-AndereFunk = string(false())">DISPLAY: none</xsl:when></xsl:choose></xsl:attribute>

    Thanks in advance

    ++

    Thierry


    Every moment hesitated is a moment gone for life!!! Think about it
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 07-08-2005 12:45 PM In reply to

    Re: xd:preserve how it work?

    The Preserve Code Block can only be applied to an xsl:template / xsl:apply-templates pair.

    Place your drop-down list box inside of a section, then go back to the XSL and you will be able to create a Preserve Code Block from the section you placed your drop-down list box in.

    Greg Collins [InfoPath MVP]
    InfoPath Dev
  • 07-11-2005 12:09 AM In reply to

    Re: xd:preserve how it work?

    Thanks a lot for your explanation I understand now why that don't work!

    ++

    Thierry

    Every moment hesitated is a moment gone for life!!! Think about it
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.