Problem solved. It is easy and it is working!! :jumping: For infos take a look here: http://www.lunatech-research.com/archives/2007/06/13/facelets-date-converter http://www.lunatech-research.com/archives/2007/06/13/facelets-date-converter
Alan Gross wrote: > > HI Forum > > Environment info: > Tomcat6 > Myfaces 1.2.2 > Facelets 1.1.13 > > I'm tring to write a flexibel string converter. The goal is to have a > converter that provides the following functionality > - substring > - remove newlines > > I would like to pass the parameters by attributes > - number of chars for substring > - number of newlines before truncating > > I took the standard converter DateTimeConverter as an example. But for > some reason I don't get it to work. > > I think the problem is that the "restoreState" method is never invoked > here. Also the "getAsObject" method is never invoked..? Don't know if > necessary? I tried to use server and client state saving method. Read it > could have an impact..? > > Does anyone have experience with passing parameters to converters? > > Any help is appreciated. Thank you! > Alan > > Attached you find the following files: > - faces-config.xml > - web.xml > - OutputTextConverter.java > http://www.nabble.com/file/p17351134/OutputTextConverter.java > OutputTextConverter.java > http://www.nabble.com/file/p17351134/faces-config.xml faces-config.xml > http://www.nabble.com/file/p17351134/web.xml web.xml > > Here is an extract of the page: > <h:outputText value="#{newsVar.description}" escape="false"> > <f:converter converterId="GwOutTextConverter" substring="5" maxNewLine="3" > test="123"/> > </h:outputText> > > > -- View this message in context: http://www.nabble.com/Converter---Problem-passing-attributes-tp17351134p17375333.html Sent from the MyFaces - Users mailing list archive at Nabble.com.

