struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Iakouchev Alexander-EAL027C" <EAL0...@motorola.com>
Subject Shale Validation Framework Issue.
Date Mon, 10 Jul 2006 14:56:17 GMT
Hello everybody! 
I am a new in Shale Validation Framework. Actually I got an error after
form was submitted. 
My Tomahawk version - 1.1.3.


[http-80-Processor24] WARN
org.apache.commons.validator.ValidatorResources - Form
'org.apache.shale.validator.minStringValue' not found for locale 'en_US'

2006-07-10 10:00:08,784 [http-80-Processor24] ERROR
StandardWrapper[/RPTCServicesManagement:Faces Servlet] -
Servlet.service() for servlet Faces Servlet threw exception

java.lang.NullPointerException

at
org.apache.shale.validator.CommonsValidator.getArgs(CommonsValidator.jav
a:621)

at org.apache.shale.validator.CommonsValidator.getMethodParamNames(Commo

nsValidator.java:585)

at org.apache.shale.validator.CommonsValidator.loadMethodParamValues(Com

monsValidator.java:715)

at org.apache.shale.validator.CommonsValidator.validate(CommonsValidator

.java:798)

at javax.faces.component._ComponentUtils.callValidators(_ComponentUtils.

java:157)

at javax.faces.component.UIInput.validateValue(UIInput.java:312)

at javax.faces.component.UIInput.validate(UIInput.java:353)

at javax.faces.component.UIInput.processValidators(UIInput.java:183)

at javax.faces.component.UIComponentBase.processValidators(UIComponentBa

se.java:624)

at javax.faces.component.UIComponentBase.processValidators(UIComponentBa

se.java:624)

at javax.faces.component.UIComponentBase.processValidators(UIComponentBa

se.java:624)

at javax.faces.component.UIComponentBase.processValidators(UIComponentBa

se.java:624)

at javax.faces.component.UIComponentBase.processValidators(UIComponentBa

se.java:624)

 

That is wrong with my code? 
Seems, information from custom-rules.xml file loaded properly, but it 
is looks like minFloatValue method can not findound. 

> > INFO: Loading validation rules file from /WEB-INF/custom-rules.xml 
> > 2006-07-07 13:52:16,714 [http-80-Processor24] WARN 
> > org.apache.myfaces.renderkit .html.util.ReducedHTMLParser - !
Invalid 
> > tag found: unexpected input while looking 

1. /WEB-INF/web.xml 
<context-param>

<param-name>org.apache.shale.validator.VALIDATOR_RULES</param-name>

<param-value>

/org/apache/shale/validator/validator-rules.xml,

/WEB-INF/custom-rules.xml

</param-value>

</context-param>


2. /WEB-INF/custom-rules.xml 

<!DOCTYPE form-validation PUBLIC

"-//Apache Software Foundation//DTD Commons Validator Rules
Configuration 1.2.0//EN"

"http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd">

 

<form-validation>

<global>

<validator name="minStringValue"

classname="mot.aptc.rptc.jobmaintenance.ValidationUtil"

method="isMinStringValue"

methodParams="java.lang.String"

msg="errors.minFloatValue">

</validator>

</global>

</form-validation>

 

4. ValidationUtil Class. 
public class ValidationUtil

implements java.io.Serializable

{

public static boolean isMinStringValue(String value1)

{

System.out.println("++++++++++++++++++ RECEIVED VALUE1 "+value1);

return false; 

}

}


5. JSP Page. 
<t:inputTextarea cols="55" rows="2"

value="#{mtJobEditor.job.tmpMiscJob.jobRequestNotes}"

tabindex="-1"

disabled="#{mtJobEditor.disabledBasicComponents}"

>

<s:commonsValidator 

type="minStringValue"

server="true"

client="false"

/>

</t:inputTextarea>


I will be appreciating for any feed back. 
Alex. 



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message