You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by Dirk Frederickx <di...@gmail.com> on 2010/03/06 22:32:57 UTC

Localized js strings

Andrew,

The localized js strings are not rendered anymore.

The DefaultLayout.jsp is referring to

    <s:layout-component name="jslocalizedstrings" />

but no toplevel jsp is defining this layout-component ?



dirk

Re: Localized js strings

Posted by Andrew Jaquith <an...@gmail.com>.
Yeah, I put that placeholder text in there recently. :)

As you'll note in my reply to Janne, I've offered to make the
IncludeResources tag work similar to how it did before, so you'll have
some options again. It would work a little differently under the
covers, but the results would be the same.

But in the meantime, where did you add the <s:layout-component
name="jslocalizedstrings" /> element? In which JSP? If you want to
e-mail me the JSPs in question off-list, I'll take a look at them. It
really should work.

Andrew

On Sun, Mar 7, 2010 at 5:44 AM, Dirk Frederickx
<di...@gmail.com> wrote:
> Yeah -- I got sofar as well :-))
>
> So I put <wiki:IncludeResources type="jslocalizedstrings"/>  back into
> DefaultLayout.jsp.
>
> Guess what :  this is what is renders in html ...
>
> <!-- Please use the Stripes layout tags instead of
> IncludeResourcesTag. See layout/DefaultLayout.jsp for instructions.
> -->
>
>
> Seems like running in circles :-)
> And I do not want to go back to early v2.8.- days where the javascript
> localization strings were inlined with a java-snippet in the JSP.
>
>
>
> dirk
>
> On Sat, Mar 6, 2010 at 11:45 PM, Andrew Jaquith
> <an...@gmail.com>wrote:
>
>> Dirk --
>>
>> The spot in DefaultLayout.jsp where you see the <s:layout-component
>> name="jslocalizedstrings" /> element is a placeholder for any
>> localized strings you want to include. Same for jsfunction. By
>> default, these components contain nothing.
>>
>> What you need to do is to override these components in the template
>> JSPs, for example in templates/default/Preferences.jsp. Just add in a
>> <s:layout-component name="jslocalizedstrings" /> element with the
>> contents you want. You can of course also change DefaultLayout.jsp if
>> you want certain strings to be included in ALL template JSPs by
>> default.
>>
>> If it helps, another way to think about this is that DefaultLayout.jsp
>> is (essentially) a superclass, and the template JSPs are the
>> "subclasses." The layout-component names are the properties, which the
>> subclasses can easily override.
>>
>> I hope this helps. Glad to see you are jumping in again now that your
>> setup is working. :)
>>
>> Andrew
>>
>> On Sat, Mar 6, 2010 at 4:32 PM, Dirk Frederickx
>> <di...@gmail.com> wrote:
>> > Andrew,
>> >
>> > The localized js strings are not rendered anymore.
>> >
>> > The DefaultLayout.jsp is referring to
>> >
>> >    <s:layout-component name="jslocalizedstrings" />
>> >
>> > but no toplevel jsp is defining this layout-component ?
>> >
>> >
>> >
>> > dirk
>> >
>>
>

Re: Localized js strings

Posted by Dirk Frederickx <di...@gmail.com>.
Yeah -- I got sofar as well :-))

So I put <wiki:IncludeResources type="jslocalizedstrings"/>  back into
DefaultLayout.jsp.

Guess what :  this is what is renders in html ...

<!-- Please use the Stripes layout tags instead of
IncludeResourcesTag. See layout/DefaultLayout.jsp for instructions.
-->


Seems like running in circles :-)
And I do not want to go back to early v2.8.- days where the javascript
localization strings were inlined with a java-snippet in the JSP.



dirk

On Sat, Mar 6, 2010 at 11:45 PM, Andrew Jaquith
<an...@gmail.com>wrote:

> Dirk --
>
> The spot in DefaultLayout.jsp where you see the <s:layout-component
> name="jslocalizedstrings" /> element is a placeholder for any
> localized strings you want to include. Same for jsfunction. By
> default, these components contain nothing.
>
> What you need to do is to override these components in the template
> JSPs, for example in templates/default/Preferences.jsp. Just add in a
> <s:layout-component name="jslocalizedstrings" /> element with the
> contents you want. You can of course also change DefaultLayout.jsp if
> you want certain strings to be included in ALL template JSPs by
> default.
>
> If it helps, another way to think about this is that DefaultLayout.jsp
> is (essentially) a superclass, and the template JSPs are the
> "subclasses." The layout-component names are the properties, which the
> subclasses can easily override.
>
> I hope this helps. Glad to see you are jumping in again now that your
> setup is working. :)
>
> Andrew
>
> On Sat, Mar 6, 2010 at 4:32 PM, Dirk Frederickx
> <di...@gmail.com> wrote:
> > Andrew,
> >
> > The localized js strings are not rendered anymore.
> >
> > The DefaultLayout.jsp is referring to
> >
> >    <s:layout-component name="jslocalizedstrings" />
> >
> > but no toplevel jsp is defining this layout-component ?
> >
> >
> >
> > dirk
> >
>

Re: Localized js strings

Posted by Andrew Jaquith <an...@gmail.com>.
Dirk --

The spot in DefaultLayout.jsp where you see the <s:layout-component
name="jslocalizedstrings" /> element is a placeholder for any
localized strings you want to include. Same for jsfunction. By
default, these components contain nothing.

What you need to do is to override these components in the template
JSPs, for example in templates/default/Preferences.jsp. Just add in a
<s:layout-component name="jslocalizedstrings" /> element with the
contents you want. You can of course also change DefaultLayout.jsp if
you want certain strings to be included in ALL template JSPs by
default.

If it helps, another way to think about this is that DefaultLayout.jsp
is (essentially) a superclass, and the template JSPs are the
"subclasses." The layout-component names are the properties, which the
subclasses can easily override.

I hope this helps. Glad to see you are jumping in again now that your
setup is working. :)

Andrew

On Sat, Mar 6, 2010 at 4:32 PM, Dirk Frederickx
<di...@gmail.com> wrote:
> Andrew,
>
> The localized js strings are not rendered anymore.
>
> The DefaultLayout.jsp is referring to
>
>    <s:layout-component name="jslocalizedstrings" />
>
> but no toplevel jsp is defining this layout-component ?
>
>
>
> dirk
>