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 2009/06/14 15:46:57 UTC
invocation of javascript
Q.
In v3.x the invocation of javascript has been moved to the top-level JSPs,
by means of :
<s:layout-component name="script"> ...
In v2.x this was done from within the template jsp, through the
TemplateManager. Eg:
TemplateManager.addResourceRequest( context, "script", contextPath +
"/scripts/jspwiki-edit.js" );
What is rationale for this ?
IMHO, the solution of v2.x gives more flexibilty to template specific
adaptations, rather then having to modifty the top-level jsp's.
Is the old solution still supported ?
dirk
Re: invocation of javascript
Posted by Janne Jalkanen <ja...@ecyrd.com>.
TemplateManager is still needed for plugins and filters, though, so we
can't exactly prevent people from using it ;-)
/Janne
On 15 Jun 2009, at 05:39, Andrew Jaquith wrote:
> There is a JSP tag that allows inclusions -- the stripes:layout-
> component tag. The 3.x UserPreferences.jsp has an example of how to
> do it. (DefaultLayout.jsp defined the components that can be
> overridden).
>
> The rationale was to simplify the relationship between top-level
> JSPs and template "content JSPs." Not all of the pieces are in place
> to allow content JSPs to override components -- yet. But I would
> rather do this via tags (preferably the stripes tags), and NOT
> through TemplateManager.
>
> Andrew
>
> On Jun 14, 2009, at 16:59, Janne Jalkanen <Ja...@ecyrd.com>
> wrote:
>
>>
>> Yup, still supported. Plugins and filters use this mechanism.
>> Might be nicer to add a JSP Tag for it, since the syntax
>> is fugly for JSPs...
>>
>> /Janne
>>
>> On Jun 14, 2009, at 16:46 , Dirk Frederickx wrote:
>>
>>> Q.
>>> In v3.x the invocation of javascript has been moved to the top-
>>> level JSPs,
>>> by means of :
>>>
>>> <s:layout-component name="script"> ...
>>>
>>>
>>>
>>> In v2.x this was done from within the template jsp, through the
>>> TemplateManager. Eg:
>>>
>>> TemplateManager.addResourceRequest( context, "script",
>>> contextPath +
>>> "/scripts/jspwiki-edit.js" );
>>>
>>>
>>> What is rationale for this ?
>>> IMHO, the solution of v2.x gives more flexibilty to template
>>> specific
>>> adaptations, rather then having to modifty the top-level jsp's.
>>> Is the old solution still supported ?
>>>
>>>
>>>
>>> dirk
>>
Re: invocation of javascript
Posted by Andrew Jaquith <an...@gmail.com>.
There is a JSP tag that allows inclusions -- the stripes:layout-
component tag. The 3.x UserPreferences.jsp has an example of how to do
it. (DefaultLayout.jsp defined the components that can be overridden).
The rationale was to simplify the relationship between top-level JSPs
and template "content JSPs." Not all of the pieces are in place to
allow content JSPs to override components -- yet. But I would rather
do this via tags (preferably the stripes tags), and NOT through
TemplateManager.
Andrew
On Jun 14, 2009, at 16:59, Janne Jalkanen <Ja...@ecyrd.com>
wrote:
>
> Yup, still supported. Plugins and filters use this mechanism. Might
> be nicer to add a JSP Tag for it, since the syntax
> is fugly for JSPs...
>
> /Janne
>
> On Jun 14, 2009, at 16:46 , Dirk Frederickx wrote:
>
>> Q.
>> In v3.x the invocation of javascript has been moved to the top-
>> level JSPs,
>> by means of :
>>
>> <s:layout-component name="script"> ...
>>
>>
>>
>> In v2.x this was done from within the template jsp, through the
>> TemplateManager. Eg:
>>
>> TemplateManager.addResourceRequest( context, "script",
>> contextPath +
>> "/scripts/jspwiki-edit.js" );
>>
>>
>> What is rationale for this ?
>> IMHO, the solution of v2.x gives more flexibilty to template specific
>> adaptations, rather then having to modifty the top-level jsp's.
>> Is the old solution still supported ?
>>
>>
>>
>> dirk
>
Re: invocation of javascript
Posted by Janne Jalkanen <Ja...@ecyrd.com>.
Yup, still supported. Plugins and filters use this mechanism. Might
be nicer to add a JSP Tag for it, since the syntax
is fugly for JSPs...
/Janne
On Jun 14, 2009, at 16:46 , Dirk Frederickx wrote:
> Q.
> In v3.x the invocation of javascript has been moved to the top-level
> JSPs,
> by means of :
>
> <s:layout-component name="script"> ...
>
>
>
> In v2.x this was done from within the template jsp, through the
> TemplateManager. Eg:
>
> TemplateManager.addResourceRequest( context, "script",
> contextPath +
> "/scripts/jspwiki-edit.js" );
>
>
> What is rationale for this ?
> IMHO, the solution of v2.x gives more flexibilty to template specific
> adaptations, rather then having to modifty the top-level jsp's.
> Is the old solution still supported ?
>
>
>
> dirk