[jboss-user] [JBoss Seam] - Re: Custom Converter
terryb
do-not-reply at jboss.com
Mon Nov 5 23:40:18 EST 2007
No luck for me yet, its still going to seam debug page. please see my code below...
| @Name("onlineConverters")
| @Scope(ScopeType.APPLICATION)
| public class Converters {
|
| private Converter memberSource;
|
| @Create
| public void init() {
| this.memberSource = new MemberSource();
| }
|
| public Converter getMemberSource() {
| return this.memberSource;
| }
|
| @Intercept(InterceptionType.NEVER)
| public class MemberSource implements Converter {
|
|
| ...
| if (conversionFailed) {
| FacesMessage facesMsg = new FacesMessage("Conversion error.", String.format("Invalid member status %s.", ((String) value)));
| facesMsg.setSeverity(FacesMessage.SEVERITY_ERROR);
| FacesMessages.instance().add(facesMsg);
|
| throw new ConverterException(facesMsg);
| }
| ...
| }
| ...
| }
|
|
| Seam Debug Page
| - Exception
| Exception during request processing: javax.servlet.ServletException: Conversion error.
| javax.faces.webapp.FacesServlet.service(FacesServlet.java:249)
| org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
| ...
| ...
| 13:36:39,887 ERROR [DebugPageHandler] redirecting to debug page
| javax.faces.convert.ConverterException: Conversion error.
| at au.edu.tisc.session.Converters$MemberSource.getAsString(Converters.java:61)
| at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getFormattedValue(HtmlBasicRenderer.java:469)
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102063#4102063
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102063
More information about the jboss-user
mailing list