shale-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gvanma...@comcast.net (Gary VanMatre)
Subject Re: clay - custom converter example
Date Wed, 08 Nov 2006 16:22:54 GMT
>Does anyone using clay with custom converters?
>I have a label which should get a converter. Tried it this way in clay
>config:
>
>...
><element renderId="2" jsfid="baseLabel">
			>  <attributes>
				>    <set name="value" value="#{user.language}" />
			>  </attributes>
			>   <element renderId="1" jsfid="f:converter">
					>       <attributes>
						>        <set name="converterId" value="language" />
				>      </attributes>
			>   </element>
></element>

Try using the converter node under the element.  The element and component includes converters,
validators, actionListeners, valueChangeListeners use the nested element that points to a
top-level definition.
<!ELEMENT element (description*, attributes?, symbols?, converter?, validator*, actionListener*,
valueChangeListener*, element*)>
<component jsfid="language" componentType="converter-id-in-faces-config">
<element renderId="2" jsfid="baseLabel">
  <attributes>
      <set name="value" value="#{user.language}" />
  </attributes>
   <converter jsfid="language">
       <attributes>
      </attributes>
   </converter>
</element>
Using the generic f:converter and the converterId doesn't work as you would expect even if
you use a conveter node.  This example should work but doesn't:
   <converter jsfid="f:converter">
       <attributes>
               <set name="converterId" value="language" />

      </attributes>
   </converter>

 I'll see if I can get that one fixed.  Please create a JIRA ticket.

Gary
Mime
View raw message