struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Wallace <rwall...@thewallacepack.net>
Subject Re: [shale] Form token giving NPE
Date Thu, 27 Apr 2006 21:35:04 GMT
Gary VanMatre wrote:
>> From: Richard Wallace <rwallace@thewallacepack.net> 
>>
>> I'm trying to use the token component on a form to ensure that a user 
>> doesn't submit the form more than once. Whenever I try and submit the 
>> form a second time, I get a NPE. I'm using it in Clay, if that makes 
>> any difference. The code is simply: 
>>
>> <form>
>>    <span jsfid="token" id="token" />
>>    <span jsfid="message" for="token" class="validation-msg" />
>>    ...
>> </form>
>>
>>
>> I'm using the 1.0.3-SNAPSHOT jars from the maven-snapshot-repository, 
>> last updated on April 19th. Any ideas why I'm getting the below NPE? 
>>
>>     
>
> It's working with myfaces 1.1.1.  The exception points at the findComponent but I would
have guessed that we are not populating one of the message component attributes.   
>
> Try adding the showSummary attribute to the message component.
>           <span jsfid="message" for="token" showSummary="true"  />
> Gary
>
>   
Ok, I created a small test app to see how the tokens would behave in a 
much simpler usage, and it works perfectly, both with plain old JSP and 
in Clay.  Guess I'll have to crank up the logging and try and sort 
through and see what exactly is going on.  I'll let you know if I find 
anything interesting.

Rich
>> Thanks, 
>> Rich 
>>
>> java.lang.NullPointerException: expr 
>> at 
>> javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:210) 
>> at 
>> org.apache.myfaces.renderkit.html.ext.HtmlMessageRenderer.createOutputLabelMap(H

>> tmlMessageRenderer.java:200) 
>> at 
>> org.apache.myfaces.renderkit.html.ext.HtmlMessageRenderer.createOutputLabelMap(H

>> tmlMessageRenderer.java:214) 
>> at 
>> org.apache.myfaces.renderkit.html.ext.HtmlMessageRenderer.createOutputLabelMap(H

>> tmlMessageRenderer.java:214) 
>> at 
>> org.apache.myfaces.renderkit.html.ext.HtmlMessageRenderer.createOutputLabelMap(H

>> tmlMessageRenderer.java:214) 
>> at 
>> org.apache.myfaces.renderkit.html.ext.HtmlMessageRenderer.createOutputLabelMap(H

>> tmlMessageRenderer.java:214) 
>> at 
>> org.apache.myfaces.renderkit.html.ext.HtmlMessageRenderer.createOutputLabelMap(H

>> tmlMessageRenderer.java:214) 
>> at 
>> org.apache.myfaces.renderkit.html.ext.HtmlMessageRenderer.createOutputLabelMap(H

>> tmlMessageRenderer.java:214) 
>> at 
>> org.apache.myfaces.renderkit.html.ext.HtmlMessageRenderer.createOutputLabelMap(H

>> tmlMessageRenderer.java:214) 
>> at 
>> org.apache.myfaces.renderkit.html.ext.HtmlMessageRenderer.getOutputLabelMap(Html

>> MessageRenderer.java:184) 
>> at 
>> org.apache.myfaces.renderkit.html.ext.HtmlMessageRenderer.findInputLabel(HtmlMes

>> sageRenderer.java:128) 
>> at 
>> org.apache.myfaces.renderkit.html.ext.HtmlMessagesRenderer.getSummary(HtmlMessag

>> esRenderer.java:54) 
>> at 
>> org.apache.myfaces.renderkit.html.HtmlMessageRendererBase.renderSingleFacesMessa

>> ge(HtmlMessageRendererBase.java:101) 
>> at 
>> org.apache.myfaces.renderkit.html.HtmlMessagesRendererBase.renderList(HtmlMessag

>> esRendererBase.java:94) 
>> at 
>> org.apache.myfaces.renderkit.html.HtmlMessagesRendererBase.renderMessages(HtmlMe

>> ssagesRendererBase.java:75) 
>> at 
>> org.apache.myfaces.renderkit.html.ext.HtmlMessagesRenderer.encodeEnd(HtmlMessage

>> sRenderer.java:42) 
>> at 
>> javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331) 
>> at 
>> org.apache.shale.clay.component.Clay.recursiveRenderChildren(Clay.java:379) 
>>
>>
>> --------------------------------------------------------------------- 
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org 
>> For additional commands, e-mail: user-help@struts.apache.org 
>>
>>     


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


Mime
View raw message