struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Parker (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (WW-3361) config-browser does not handle validators that do not contain a fieldName parameter
Date Sat, 10 Apr 2010 17:04:41 GMT

    [ https://issues.apache.org/jira/browse/WW-3361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12855589#action_12855589
] 

Charles Parker edited comment on WW-3361 at 4/10/10 1:02 PM:
-------------------------------------------------------------

I recommend "(see expression)", since there may be multiple fields referenced in the expression
but not defined via the fieldName property. This would point the developer in the right direction
for troubleshooting.

I'm not aware of any cases other than an Expression validator that would be missing the fieldName.
If there are, then "(undefined)" does seem appropriate unless more helpful information can
be provided.

I believe the parentheses (or similar notation) are important to indicate that this is not
an actual value of the fieldName property.

      was (Author: ctparker):
    I recommend "(see expression)", since there may be multiple fields involved but not defined
via the 'fieldName' property. It points the developer in the right direction.

I'm not aware of any cases other than an Expression validator that would be missing the fieldName.
If there are, then "(undefined)" does seem appropriate unless more helpful information can
be provided.

I believe the parentheses (or similar notation) are important to indicate that this is not
an actual value of the fieldName property.
  
> config-browser does not handle validators that do not contain a fieldName parameter
> -----------------------------------------------------------------------------------
>
>                 Key: WW-3361
>                 URL: https://issues.apache.org/jira/browse/WW-3361
>             Project: Struts 2
>          Issue Type: Bug
>          Components: XML Configuration
>    Affects Versions: 2.1.8
>         Environment: Windows XP, Eclipse Ganymede, Java 6, Tomcat 6
>            Reporter: Charles Parker
>            Assignee: Lukasz Lenart
>            Priority: Minor
>             Fix For: 2.2.0
>
>
> Viewing the validators for an action with a validator that does not have a 'fieldName'
parameter (such as an 'expression' validator) results in an exception in config-browser.
> The following validator:
> <validator type="expression">
>     <param name="expression">password.equals(passwordVerify)</param>
>     <message>The passwords you enter must match.</message>
> </validator>
> causes:
> Expression i.fieldName is undefined on line 30, column 23 in config-browser/showValidators.ftl.
> The problematic instruction:
> ----------
> ==> ${i.fieldName} [on line 30, column 21 in config-browser/showValidators.ftl]
> ----------
> Java backtrace for programmers:
> ----------
> freemarker.core.InvalidReferenceException: Expression i.fieldName is undefined on line
30, column 23 in config-browser/showValidators.ftl.
> 	at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
> 	at freemarker.core.Expression.getStringValue(Expression.java:118)
> 	at freemarker.core.Expression.getStringValue(Expression.java:93)
> 	at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
> 	at freemarker.core.Environment.visit(Environment.java:209)
> 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
> 	at freemarker.core.Environment.visit(Environment.java:209)
> 	at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167)
> 	at freemarker.core.Environment.visit(Environment.java:416)
> 	at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
> 	at freemarker.core.Environment.visit(Environment.java:209)
> 	at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
> 	at freemarker.core.Environment.visit(Environment.java:209)
> 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
> 	at freemarker.core.Environment.visit(Environment.java:209)
> 	at freemarker.core.Environment.process(Environment.java:189)
> 	at freemarker.template.Template.process(Template.java:237)
> 	at org.apache.struts2.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:187)
> 	at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:362)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:266)
> 	at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> 	at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)
> 	at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> 	at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> 	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> 	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> 	at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> 	at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> 	at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> 	at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> 	at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> 	at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
> 	at org.apache.struts2.components.ActionComponent.executeAction(ActionComponent.java:289)
> 	at org.apache.struts2.components.ActionComponent.end(ActionComponent.java:172)
> 	at org.apache.struts2.views.freemarker.tags.CallbackWriter.afterBody(CallbackWriter.java:84)
> 	at freemarker.core.Environment.visit(Environment.java:300)
> 	at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130)
> 	at freemarker.core.Environment.visit(Environment.java:209)
> 	at freemarker.core.IfBlock.accept(IfBlock.java:82)
> 	at freemarker.core.Environment.visit(Environment.java:209)
> 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
> 	at freemarker.core.Environment.visit(Environment.java:209)
> 	at freemarker.core.Environment.process(Environment.java:189)
> 	at freemarker.template.Template.process(Template.java:237)
> 	at org.apache.struts2.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:187)
> 	at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:362)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:266)
> 	at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> 	at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)
> 	at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> 	at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> 	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> 	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> 	at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> 	at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> 	at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
> 	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> 	at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> 	at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
> 	at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
> 	at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
> 	at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
> 	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
> 	at java.lang.Thread.run(Thread.java:619)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message