Are you intending for these values to come from your application resource
bundle?  That's where getText() gets it's values from.  I believe it it
doesn't find anything it just returns whatever is passed to is, which might
be why you're seeing what I expect you are expecting.

If you are actually trying to test this out with static values (or use
static values), try this instead (note the embedded single quotes within the
double quoted, maybe cutting-n-pasting would work best)

<s:param name="helpTitle"  value="'example1'"/>
<s:param name="helpText" value="'example2'"/>

  (*Chris*)

On Tue, Jul 20, 2010 at 12:20 PM, Emi Lu <em...@encs.concordia.ca> wrote:

> On 07/20/2010 01:39 PM, Dale Newfield wrote:
>
>> On 7/20/10 11:48 AM, Emi Lu wrote:
>>
>>> It seems that "s:param" does not work well when more than one s:param is
>>> assigned.
>>>
>>
>> I use multiple param tags inside url tags all over the place. It does
>> work. I would suggest running your application inside a debugger to find
>> out what exactly is not working for you. One thing I would suggest is
>> eliminating ambiguities -- value fields (for example) are going to be
>> interpreted as OGNL, so if you want the ognl expression contents, then
>> value="%{contents}" and if you want the string contents, then
>> value="%{'contents'}".
>>
>
> Thank you for all your inputs!
>
> Conclusion:
> =================
> (1) workable version:
> <s:param name="helpTitle"      value="%{getText('example1')}" />
> <s:param name="helpText"       value="%{getText('example2')}" />
>
> (2) this way, it does not work:
>
> <s:param name="helpTitle"      value="example1" />
> <s:param name="helpText"       value="example2" />
>
> Frankly, I do *not* like way(1) since "%{getText('example2')}" is a very
> long paragraph. I prefer to transfer key property and retrieve text in
> Action Class.
>
> Anyhow, it seems that this is the current solution I could find for now.
>
> If you have better ideas, please let me know.
>
>
> Thanks a lot!
>
> --
> Lu Ying
>
> Note:
> attribute.property
> =====================
> example1=Title info
> example2=...... a very long paragraph ...
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

Reply via email to