You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Wayne Fay <wa...@gmail.com> on 2005/11/01 19:33:27 UTC

HtmlDataTable.hasErrorMessages is true -- how to access the error messages??

I'm getting the following error message on a Tomahawk DataTable:

javax.faces.FacesException:
org.apache.myfaces.component.html.ext.HtmlDataTable.hasErrorMessages(Ljavax/faces/context/FacesContext;)Z
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)	
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)	
at com.evermind[Oracle Application Server Containers for J2EE 10g
(10.1.2.0.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)


I'm just wondering how I can programmatically access the HtmlDataTable
error messages in my JSPX page?

I have a ton of log.trace() messages in my code and things are more or
less proper. So I'd like to read the error messages out of that
HtmlDataTable object and see what exactly is going on...

Here's the declaration of my DataTable, though I don't think it is
terribly useful:

<t:dataTable id="externalData"
          cellpadding="5"
          border="1"
          rowClasses="data_row"
          headerClass="data_table"
          value="#{externalDataAction.externalDataList}"
          sortColumn="#{externalDataAction.sort}"
          sortAscending="#{externalDataAction.ascending}"
          forceIdIndexFormula="#{externalData.externalData.id}"
          var="externalData"
          preserveSort="true">

Thanks for any assistance!
Wayne

Re: HtmlDataTable.hasErrorMessages is true -- how to access the error messages??

Posted by Mathias Brökelmann <mb...@googlemail.com>.
hasErrorMessages simply calls getMessages() from the current
FacesContext and tries to find an error message. Take a look into the
source code to see what is happening.

2005/11/1, Wayne Fay <wa...@gmail.com>:
> I'm getting the following error message on a Tomahawk DataTable:
>
> javax.faces.FacesException:
> org.apache.myfaces.component.html.ext.HtmlDataTable.hasErrorMessages(Ljavax/faces/context/FacesContext;)Z
> at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
> at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
> at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
> at com.evermind[Oracle Application Server Containers for J2EE 10g
> (10.1.2.0.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
>
>
> I'm just wondering how I can programmatically access the HtmlDataTable
> error messages in my JSPX page?
>
> I have a ton of log.trace() messages in my code and things are more or
> less proper. So I'd like to read the error messages out of that
> HtmlDataTable object and see what exactly is going on...
>
> Here's the declaration of my DataTable, though I don't think it is
> terribly useful:
>
> <t:dataTable id="externalData"
>           cellpadding="5"
>           border="1"
>           rowClasses="data_row"
>           headerClass="data_table"
>           value="#{externalDataAction.externalDataList}"
>           sortColumn="#{externalDataAction.sort}"
>           sortAscending="#{externalDataAction.ascending}"
>           forceIdIndexFormula="#{externalData.externalData.id}"
>           var="externalData"
>           preserveSort="true">
>
> Thanks for any assistance!
> Wayne
>


--
Mathias