cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Guillard <pguill...@soociety.com>
Subject Re: cform fi:styling
Date Fri, 11 Mar 2005 02:35:39 GMT
Thanks Chris.

Christian K├Ânitzer wrote:

> Hi
>
> You define your field's in a file called e.g. "forms.xml":
> (this is an example of a dropeDown List)
>
> <fd:field id="availableBookmarks" required="false">
>            
> <fd:label><i18n:text>bookmarkCoplet.availableBookmarks</i18n:text></fd:label>

>
>            <fd:datatype base="string"/>                 
> <fd:selection-list     type="flow-jxpath"
>                                list-path="availableBookmarks"
>                                label-path="."
>                                value-path=".">                
> </fd:selection-list>
> </fd:field>
>
> But your styling-information doesn't belong inside it.
> For that you have an other file called e.g. "template.xml" (it's like 
> yout HTML-file):
>
> <ft:widget id="availableBookmarks">
>    <fi:styling size="1" />
>    <fi:styling onchange="javascript:sendForm('change_type');"/>
> </ft:widget>
> You see, for each styling information you can make an own entry.
>
>
> So, if you like to make a radio-botton, but this example in your 
> "forms.xml":
>    <fd:field id="adresse1b" required="false">
>            <fd:label><i18n:text>OBJEKTART</i18n:text></fd:label>
>            <fd:datatype base="integer"/>
>            <fd:selection-list >
>                <fd:item 
> value="0"><fd:label><i18n:text>STRASSE</i18n:text></fd:label></fd:item>
>               <fd:item 
> value="1"><fd:label><i18n:text>ANDERE_ANGABEN</i18n:text></fd:label></fd:item>

>
>         </fd:selection-list>
>       </fd:field>
>
> and this example in your "template.xml":
>    <ft:widget id="adresse1b">
>        <fi:styling list-type="radio"/>
> [as much more styling as you like to have]
>
>    </ft:widget>
>
> I hope you understand :)
>
> Regards Chris
>
>
>
> Philippe Guillard wrote:
>
>> Hi all,
>>
>> It seems that the usual way to add some attributes to a field in 
>> CForms is to use  fi:styling tags.
>>
>> I tried this on a fd:field without success : <fi:styling 
>> list-type="radio" onChange="javascript: test();"/>, it seems that i 
>> can only add one attribute, in that case list-type or onChange, but 
>> not the two. I checked forms-field-styling.xsl and added :
>>
>>  <xsl:template match="fi:styling/@onChange" mode="styling">
>>      <xsl:attribute name="onchange"><xsl:copy-of 
>> select="."/></xsl:attribute>
>>  </xsl:template>
>>
>> No result the onChange attribute is not copied.
>>
>> Any idea?
>>
>> Phil
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message