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.

Chris

-----Ursprüngliche Nachricht-----
Von: Jason Johnston [mailto:[EMAIL PROTECTED] 
Gesendet: Samstag, 22. Juli 2006 01:15
An: [email protected]
Betreff: Re: AJAX enabling custom widget

Christofer Dutz wrote:
> Hi
> 
> I am migrating an existing application to ajax. I managed to update 
> almost everything. The only problem I am still having is my custom 
> styling for a field which I use for view-selection.
> 
> When using the default (drop-down-box) styling, everything works. My 
> custom styling outputs HTML-code which displays tabs with links for 
> switching the active tag. When clicking on a link the view state changes 
> correctly. Unfortunately the control itself has to be updated as well. 
> This does not work.
> 
> 
> How can I make Cocoon/Ajax update the content and the control?

Not sure we can help without seeing the code in question.  Could you 
paste the XSL template you use for your custom styling into this thread?

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




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

Reply via email to