I am trying to get the following code to work that was taken almost verbatim 
from the ui example in Seam 1.2.1.  By the converter is never called.

In fact is does not work for me in the ui example either.  I put a System.out 
and recompiled the example and I never see any output.

Any help would be most appreciated. 


  | 
  | import static org.jboss.seam.InterceptionType.NEVER;
  | 
  | import javax.faces.component.UIComponent;
  | import javax.faces.context.FacesContext;
  | import javax.faces.convert.ConverterException;
  | 
  | import org.jboss.seam.annotations.Intercept;
  | import org.jboss.seam.annotations.Name;
  | 
  | 
  | @Name("newlineConverter")
  | @Intercept(NEVER)
  | @org.jboss.seam.annotations.jsf.Converter
  | public class NewlineBrConverter implements javax.faces.convert.Converter
  | 
  | {
  |   public NewlineBrConverter() { }
  | 
  |   public String getAsString(FacesContext context, UIComponent component, 
Object value)
  |   {
  |     try {           
  |       System.out.print("newlineConverter");
  |       return ((String)value).replaceAll("\r\n","<br/>");
  |     } catch (Exception e) {
  |       return null;
  |     }
  |   }
  | 
  |   public Object getAsObject(FacesContext context, UIComponent component, 
String value) throws ConverterException
  |   {
  |     System.out.print("newlineConverter");
  |     return value + "";
  |   }
  | 
  | }
  | 


  |         <rich:column styleClass="wrap" >
  |           <f:facet name="header">text</f:facet>
  |           <h:outputText value="#{messageL.text}" 
converter="#{converters.newlineConverter}"/>
  |         </rich:column>
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038965#4038965

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038965
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to