Christofer Dutz wrote:
Hi,

I added the following code underneath the radio-styled selection-lists in
forms-field-styling.xsl:

  <!--+
    | fi:field with a selection list and @type 'tabs'
    +-->
  <xsl:template
match="fi:field[fi:selection-list][fi:styling/@list-type='tabs']"
priority="2">
    <xsl:variable name="value" select="fi:value"/>
    <input type="hidden" name="[EMAIL PROTECTED]" value="{fi:value}"/>
    <xsl:for-each select="fi:selection-list/fi:item">
      <xsl:choose>
        <xsl:when test="@value = $value">
          <tab selected="true"><xsl:value-of select="fi:label"/></tab>
        </xsl:when>
        <xsl:otherwise>
          <tab title="{../../fi:hint}" href="#"
onclick="document.cform.{../../@id}.value = '[EMAIL PROTECTED]';
forms_submitForm(this, '{../../@id}'); return false"><xsl:value-of
select="fi:label"/></tab>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:for-each>
  </xsl:template>

The tab-elements are rendered by my display stylesheets.

Stylings for AJAX require that they are self-contained within a single element, whose id is equal to that of the widget. That way when the widget indicates it needs to be updated, the AJAX code knows where to insert its replacement in the DOM.

If you wrap the contents of your styling within a single
<span id="[EMAIL PROTECTED]">...</span> it should work. See the built-in forms-field-styling.xsl stylings for more examples.

--Jason


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to