You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Alec C4 <al...@gmail.com> on 2008/05/22 13:36:13 UTC

unclear behavior of submit-control

<s:submit key="some.key.from.resource.bundle" /> throws OgnlException. But
<s:submit label="submit" /> works fine. what does it means? How to access
some.key.from.resource.bundle to display it as label?
-- 
View this message in context: http://www.nabble.com/unclear-behavior-of-submit-control-tp17402365p17402365.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: unclear behavior of submit-control

Posted by Alec C4 <al...@gmail.com>.
not working :( but looks like a <s:submit label="submit" /> 
-- 
View this message in context: http://www.nabble.com/unclear-behavior-of-submit-control-tp17402365p17412337.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: unclear behavior of submit-control

Posted by Dave Newton <ne...@yahoo.com>.
I thought if you specified "key" it would try to use that value as the
name, label, and value. That might be consistent with what you're
seeing, where it's trying to set a value on an action property object
graph:

> Exception caught setting 'user.registration.submit.button' 
> on 'class portal.struts2.actions.aaa.RegisterUserAction

What happens if you use OGNL in the label expression, like so?

label='%{getText("user.registration.submit.button")}'

I don't recall if supplying a "key" implies its value will be used as
the value as well.

Dave

--- Alec C4 <al...@gmail.com> wrote:
> ognl.OgnlException: source is null for getProperty(null,
> "registration")
>         at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1638)
>         at ognl.ASTProperty.getValueBody(ASTProperty.java:92)
>         at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
>         at ognl.SimpleNode.getValue(SimpleNode.java:210)
>         at ognl.ASTChain.setValueBody(ASTChain.java:168)
>         at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
>         at ognl.SimpleNode.setValue(SimpleNode.java:246)
>         at ognl.Ognl.setValue(Ognl.java:476)
>         at
> com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:197)
>         at
>
com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:150)
>         at
>
com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:138)
>         at
>
com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:205)
>         at
>
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:162)
>         at
>
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
>         at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
>         at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
>         at
>
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)
>         at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)
> 
> 
> .........
> 
> expr: user.registration.submit.button val:
> [Ljava.lang.String;@1c71508
> context: ognl.OgnlContext@67cce882 root:[portal.s
> truts2.actions.aaa.RegisterUserAction@1e7d12b,
> com.opensymphony.xwork2.DefaultTextProvider@7d2796] value:
> [Ljava.lang.St
> ring;@1c71508
> [2008-05-22 21:38:43,187] ERROR
> com.opensymphony.xwork2.interceptor.ParametersInterceptor
> ParametersInterceptor - [setPa
> rameters]: Unexpected Exception caught setting
> 'user.registration.submit.button' on 'class
> portal.struts2.actions.aaa.Re
> gisterUserAction: Error setting expression
> 'user.registration.submit.button'
> with value '[Ljava.lang.String;@1c71508'
> 
> -- 
> View this message in context:
>
http://www.nabble.com/unclear-behavior-of-submit-control-tp17402365p17409629.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> 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


Re: unclear behavior of submit-control

Posted by Alec C4 <al...@gmail.com>.
ognl.OgnlException: source is null for getProperty(null, "registration")
        at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1638)
        at ognl.ASTProperty.getValueBody(ASTProperty.java:92)
        at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
        at ognl.SimpleNode.getValue(SimpleNode.java:210)
        at ognl.ASTChain.setValueBody(ASTChain.java:168)
        at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
        at ognl.SimpleNode.setValue(SimpleNode.java:246)
        at ognl.Ognl.setValue(Ognl.java:476)
        at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:197)
        at
com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:150)
        at
com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:138)
        at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:205)
        at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:162)
        at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
        at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
        at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
        at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)
        at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)


.........

expr: user.registration.submit.button val: [Ljava.lang.String;@1c71508
context: ognl.OgnlContext@67cce882 root:[portal.s
truts2.actions.aaa.RegisterUserAction@1e7d12b,
com.opensymphony.xwork2.DefaultTextProvider@7d2796] value: [Ljava.lang.St
ring;@1c71508
[2008-05-22 21:38:43,187] ERROR
com.opensymphony.xwork2.interceptor.ParametersInterceptor
ParametersInterceptor - [setPa
rameters]: Unexpected Exception caught setting
'user.registration.submit.button' on 'class portal.struts2.actions.aaa.Re
gisterUserAction: Error setting expression 'user.registration.submit.button'
with value '[Ljava.lang.String;@1c71508'

-- 
View this message in context: http://www.nabble.com/unclear-behavior-of-submit-control-tp17402365p17409629.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: unclear behavior of submit-control

Posted by Laurie Harper <la...@holoweb.net>.
Alec C4 wrote:
> <s:submit key="some.key.from.resource.bundle" /> throws OgnlException. But
> <s:submit label="submit" /> works fine. what does it means? How to access
> some.key.from.resource.bundle to display it as label?

That's right. What's the exception? We can't tell you what it means if 
we don't know what it is...

L.


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