In case anyone also needs this, I avoided this by using the
tag (thus using the value stack). It worked just fine without adding the
extra property to the Action class.
Wes Wannemacher wrote:
I don't think you are understanding what I am telling you... When you
read a parameter directly, it wi
Thanks Wes,
I understood what you meant in your first reply and I appreciate it.
However I'm used to doing simple calculations on a JSP (like just adding
a 1 to a guaranteed numeric value), independent of the Action class. I
guess this is part of my coding techniques in using non-thread safe
I don't think you are understanding what I am telling you... When you
read a parameter directly, it will be a string. It's pretty much the
same as calling -
request.getParameter("paramName");
(http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/ServletRequest.html#getParameter(java.lang
Thanks Wes,
No offense to this approach, but is this the only way to do additions
(and for this matter, any other operations) within a struts2 tag?. This
is simply not clean (e.g. adding a property to my action for a counter,
etc).
Thanks anyway!
Alberto
Wes Wannemacher wrote:
#request.fo
#request.foo is going to evaluate as a j.l.String. If your action has
a getter for foo, then just refer to it as "%{foo + 1}", conversely,
if you are feeling confident, you can make a static call to parse it -
"[EMAIL PROTECTED]@parseInt(#request.foo) +1}"
-Wes
On 12/10/07, Alberto A. Flores <[EM
I'm currently migrating an app from Struts 1.x to 2.x and encounter this
situation where I was calculating the tabIndex of a JSP on the fly
(reusable JSP). In struts 1.x this was done using
"/>
...
According to the Struts2 documentation, non-string attributes are
evaluated as expressions, s
ot; <[EMAIL PROTECTED]>
To: "Struts Users Mailing List"
Sent: Sunday, January 09, 2005 3:17 AM
Subject: Re: Runtime expressions
> On Sat, 8 Jan 2005 22:16:49 +1000, William Ferguson
> <[EMAIL PROTECTED]> wrote:
>
> >
> >
>
> You can't nest any
On Sat, 8 Jan 2005 22:16:49 +1000, William Ferguson
<[EMAIL PROTECTED]> wrote:
>
>
You can't nest any custom tags like this.
Following works well with JSP 1.2:
but you need the html-el taglib (it means NOT the original html taglib included
in the minimal struts-lib distribution).
You ha
Yes. Tomact 5.0.28
Is that significant?
William
- Original Message -
From: "Larry Meadors" <[EMAIL PROTECTED]>
To: "William Ferguson" <[EMAIL PROTECTED]>
Cc: "Struts Users Mailing List"
Sent: Saturday, January 08, 2005 11:39 PM
Subject: Re
gt; However the versions that were supplied appear to suppport runtime
> expressions.
> Here is the definition for html:errors:
>
> errors
> org.apache.struts.taglib.html.ErrorsTag
> empty
>
> bundle
> false
> true
>
>
> local
Well,
thats the thing, with Struts 1.2.4 (I quoted the wrong version before), I
could only find the standard TLDs.
Ie there weren't standard and el versions.
However the versions that were supplied appear to suppport runtime
expressions.
Here is the definition for html:errors:
e
Hmm, you did not say in the original email - are you using the html-el tld?
If not, it will not work.
Larry
On Sat, 8 Jan 2005 22:16:49 +1000, William Ferguson
<[EMAIL PROTECTED]> wrote:
> If I have defined
>
>
>
> in a JSP, and I have saved an ActionMessage keyed on 'quantity.0' into the
> R
If I have defined
in a JSP, and I have saved an ActionMessage keyed on 'quantity.0' into the
Request, during execution of my Action,
should I expect either or both of
to generate some output?
does generate the expected output, so why not the others?
What do I need to do to the error messa
13 matches
Mail list logo