You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Massimiliano Cantoni <ma...@assicom.com> on 2006/04/18 17:57:38 UTC

Converter with parameters

I am trying to develop an application using Myfaces and now I am facing 
this problem:

I am trying to develop a custom converter using the converter tag.
To be more concrete I am trying to convert the name of a document given 
the id.
Unfortunately the name of the document is not depending only on the id 
but also on another customization number and
I do not know how to pass it to the converter.

I tried the following

<h:outputText value="#{obj.id}" >
    <f:converter converterId="MyConverter">
       <f:attribute name="custom" value="#{obj.custom}"/>
    </f:converter>
</h:outputText>

But unfortunately it says that converter must be empty according to TLD.

I tried also the follwing
<h:outputText value="#{obj.id}" >
    <f:attribute name="custom" value="#{obj.custom}"/>
    <f:converter converterId="MyConverter"/>
</h:outputText>

and tried to get custom from MyConverter code without any success.

Am I using the correct approach?

Can someone point me on the right direction?

JSF newbie but not too much

-- 
------------------------------------------
Cantoni Massimiliano

CED Assicom S.p.a. 
email: massimiliano.cantoni@assicom.com
Indirizzo: Via De Cocule 33030 BUIA(UD)
Telefono: 0432/9683
------------------------------------------