--- On Thu, 12/18/08, James Carr wrote:
> Could you guys just tell me where the #stext velocity macro 
> is defined? PLEASE!?

Chill, I was eating dinner.

AFAICT the #stext macro isn't set up to be a multi-line macro (like #sform is), 
which I think would preclude the use of nested macros like the form tag uses.

The problem is that if it's defined as a block tag then there's no way to use 
it as an inline tag. I'm not really up on Velocity anymore, but I think this is 
something inherent (at least up to the version S2.0.14 is using, 1.4?).

Unless someone w/ more Velocity knowledge steps up I'd have to say that for now 
I'd work around it (when possible) by creating the message in the action and 
exposing it that way. Not ideal, but neither is making #stext a block tag.

Dave


On Thu, Dec 18, 2008 at 4:16 PM, James Carr <james.r.c...@gmail.com> wrote:
> Hi All,
>
> We're currently using struts 2 and using velocity in order to include
> some existing templates from another project. Everything has been
> working great... until we try to use i18n with parameters. I've read
> all the pages on the struts 2 site, there's no clear example of what
> we're supposed to do to just pass a parameter in for a translatable
> component in velocity. In jsp we just use:
>
> <s:text key="foo.prop">
>  <s:param name="value">bar</s:param>
> </s:text>
>
> with a property file like:
> foo.prop=Hi my name is {0}
>
> I posted this before, but am reposting in hopes of making my question
> clearer. Is the velocity result type just outright broken? And if it
> is, could it be fixed please? I searched the source for the velocity
> macro for #stext, but no luck... i only found text.vm which is just a
> velocity macro for inputs of type text.
>
> Please give me a hint... I'd rather use the framework rather than
> resort to some custom solution to an everyday task. :(
>
> Thanks,
> James
>

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



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

Reply via email to