tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim McCollom" <...@evercare.dk>
Subject Foreach and errorRenderers problem
Date Fri, 02 Sep 2005 14:11:55 GMT
Hi, I am trying to hack together an error componenet to display all the
errors as opposed to just the first one. I have a jwc that looks like:

<span jwcid="@Conditional" condition="ognl:delegate.hasErrors">
<div class="error">
<span jwcid="@Insert" value="ognl:delegate.errorRenderers.size">Error
Count</span>
<table>
  <tr
    jwcid="@Foreach"
    source="ognl:delegate.errorRenderers"
    value="ognl:err"
    element="tr">
    <td>
      <span class="error"> 
      <span jwcid="@Insert" value="ognl:err">Error Message</span>
      </span>
     </td>
  </tr>
</table>
</div>
</span>

This worked fine when I was just displaying the first error, so I know the
delegate is getting set properly. But now that I have put in the Foreach
statement I get this  Exception every time. Does anyone know why??: 

org.apache.tapestry.BindingException
Unable to update OGNL expression '<parsed OGNL expression>' of
$ShowError_2@69695f[RegisterMember/$ShowError] to You must enter a value for
First Name.: $ShowError_2.err
binding: 	ExpressionBinding[RegisterMember/$ShowError err]
location: 	context:/WEB-INF/ShowError.html, line 8
3	jwcid="@Conditional"
4	condition="ognl:delegate.hasErrors">
5	<div class="error">
6	<span jwcid="@Insert"
value="ognl:delegate.errorRenderers.size">Error Message</span>
7	<table>
8	<tr
9	jwcid="@Foreach"
10	source="ognl:delegate.errorRenderers"
11	value="ognl:err"
12	element="tr">
13	<td>
 
org.apache.hivemind.ApplicationRuntimeException
Unable to update OGNL expression '<parsed OGNL expression>' of
$ShowError_2@69695f[RegisterMember/$ShowError] to You must enter a value for
First Name.: $ShowError_2.err
component: 	$ShowError_2@69695f[RegisterMember/$ShowError]
location: 	context:/RegisterMember.html, line 4
1	<html>
2	<h3>Register New Member</h3>
3	<form jwcid="form@Form" listener="listener:formSubmit"
delegate="bean:delegate">
4	<span jwcid="@ShowError" delegate="bean:delegate" />
5	<table>
6	<tr>
7	<th><label jwcid="@FieldLabel" field="component:inputFirstName"
/></th>
8	<td><input jwcid="inputFirstName" /></td>
9	</tr>
 
ognl.NoSuchPropertyException
$ShowError_2.err
name: 	err
target: 	$ShowError_2@69695f[RegisterMember/$ShowError]
Stack Trace:

    *
ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:133)
    * ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1629)
    * ognl.ASTProperty.setValueBody(ASTProperty.java:105)
    * ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
    * ognl.SimpleNode.setValue(SimpleNode.java:246)
    * ognl.Ognl.setValue(Ognl.java:476)
    *
org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.writeCompiled(Expr
essionEvaluatorImpl.java:121)
    *
$ExpressionEvaluator_10617211d36.writeCompiled($ExpressionEvaluator_10617211
d36.java)
    *
org.apache.tapestry.binding.ExpressionBinding.setObject(ExpressionBinding.ja
va:172)
    * $Foreach_5.setValueParameter($Foreach_5.java)
    *
org.apache.tapestry.components.Foreach.renderComponent(Foreach.java:101)
    *
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:612)
    *
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:429)
    *
org.apache.tapestry.components.Conditional.renderComponent(Conditional.java:
51)
    *
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:612)
    *
org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
    *
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:612)
    *
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:429)
    *
org.apache.tapestry.form.FormSupportImpl.render(FormSupportImpl.java:464)
    * org.apache.tapestry.form.Form.renderComponent(Form.java:250)
    *
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:612)
    *
org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
    *
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:612)
    * org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:275)
    *
org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:368)
    *
org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse(Respon
seRendererImpl.java:71)
    *
$ResponseRenderer_10617211c54.renderResponse($ResponseRenderer_10617211c54.j
ava)
    *
$ResponseRenderer_10617211c53.renderResponse($ResponseRenderer_10617211c53.j
ava)
    *
org.apache.tapestry.engine.DirectService.service(DirectService.java:135)
    * $IEngineService_10617211cb7.service($IEngineService_10617211cb7.java)
    *
org.apache.tapestry.services.impl.EngineServiceInnerProxy.service(EngineServ
iceInnerProxy.java:74)
    *
org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServ
iceOuterProxy.java:65)
    *
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:248)
    *
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngin
eTerminator.java:60)
    *
$WebRequestServicer_10617211c98.service($WebRequestServicer_10617211c98.java
)
    *
$WebRequestServicer_10617211c97.service($WebRequestServicer_10617211c97.java
)
    *
$WebRequestServicer_10617211c94.service($WebRequestServicer_10617211c94.java
)
    *
$WebRequestServicer_10617211c93.service($WebRequestServicer_10617211c93.java
)
    *
org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(W
ebRequestServicerPipelineBridge.java:56)
    *
$ServletRequestServicer_10617211c78.service($ServletRequestServicer_10617211
c78.java)
    *
$ServletRequestServicer_10617211c77.service($ServletRequestServicer_10617211
c77.java)
    *
org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInj
ector.java:55)
    *
$ServletRequestServicerFilter_10617211c74.service($ServletRequestServicerFil
ter_10617211c74.java)
    *
$ServletRequestServicerFilter_10617211c73.service($ServletRequestServicerFil
ter_10617211c73.java)
    *
$ServletRequestServicer_10617211c79.service($ServletRequestServicer_10617211
c79.java)
    *
org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecode
rFilter.java:52)
    *
$ServletRequestServicerFilter_10617211c72.service($ServletRequestServicerFil
ter_10617211c72.java)
    *
$ServletRequestServicerFilter_10617211c71.service($ServletRequestServicerFil
ter_10617211c71.java)
    *
$ServletRequestServicer_10617211c79.service($ServletRequestServicer_10617211
c79.java)
    *
org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestE
ncoding.java:53)
    *
$ServletRequestServicerFilter_10617211c76.service($ServletRequestServicerFil
ter_10617211c76.java)
    *
$ServletRequestServicerFilter_10617211c75.service($ServletRequestServicerFil
ter_10617211c75.java)
    *
$ServletRequestServicer_10617211c79.service($ServletRequestServicer_10617211
c79.java)
    *
$ServletRequestServicer_10617211c6c.service($ServletRequestServicer_10617211
c6c.java)
    *
$ServletRequestServicer_10617211c6b.service($ServletRequestServicer_10617211
c6b.java)
    *
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:141
)
    *
org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:186)
    * javax.servlet.http.HttpServlet.service(HttpServlet.java:616)
    * javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    * org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)
    *
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandl
er.java:475)
    *
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
    * org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
    *
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext
.java:635)
    * org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
    * org.mortbay.http.HttpServer.service(HttpServer.java:954)
    * org.mortbay.http.HttpConnection.service(HttpConnection.java:814)
    * org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)
    * org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)
    *
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
    * org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
    * org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Mime
View raw message