You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Ricardo Tercero Lozano <rt...@gmail.com> on 2006/05/18 19:09:31 UTC
MYFACES-1259 not resolved? (javascript error: getScrolling is not defined)
Hello,
today I tested my application against myfaces-core-1.1.3 and
tomahawk-1.1.2and I found an issue related to HtmlCommandLink. Every
time I click on a
link, a javascript error is generated: getScrolling is not defined.
I'm running tomcat 5.5.15. I've setted extensions filter as shown in
[MYFACES-1259] and if I set the context-param
org.apache.myfaces.AUTO_SCROLLto true I get the above javascript
error.
The only workaround I found is set the context-param to false.
Re: MYFACES-1259 not resolved? (javascript error: getScrolling is not defined)
Posted by Mike Kienenberger <mk...@gmail.com>.
Ricardo,
The best filter mapping is to put
/faces/myFacesExtensionsResource/* first (because it handles servlet
independent resources)
and to put the servlet name mapping one last (because it should act as
"one unit" with the servlet filter).
And put everything else between them.
On 5/19/06, Ricardo Tercero Lozano <rt...@gmail.com> wrote:
> I've resolved the problem. I'm using Sitemesh for page decoration. The
> matter is extensionsFilter parses the page and mark start and end body and
> head positions. If extensions filter is mapped directly to faces servlet it
> executes before sitemesh filter and resulting page has no body what avoids
> myfaces javascript insertion.
>
> The solution was to put extensions filter mapping before sitemesh filter and
> map extensions filter to *.jsf (*.html in my case). This way:
>
>
> <filter-mapping>
> <filter-name>extensionsFilter</filter-name>
>
> <url-pattern>*.html</url-pattern>
>
> </filter-mapping>
>
> <filter-mapping>
> <filter-name>extensionsFilter</filter-name>
>
> <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
> </filter-mapping>
>
>
> Ricardo.
>
>
>
> On 5/19/06, Ricardo Tercero Lozano <rtercerol@gmail.com > wrote:
> >
> >
> > This is my filter configuration in web.xml:
> >
> > <filter>
> > <filter-name>extensionsFilter</filter-name>
> >
> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
> > <init-param>
> > <param-name>uploadRepositoryPath</param-name>
> > <param-value>/temp</param-value>
> > </init-param>
> > <init-param>
> > <param-name>maxFileSize</param-name>
> > <param-value>2m</param-value>
> > </init-param>
> > </filter>
> >
> > <filter-mapping>
> > <filter-name>extensionsFilter</filter-name>
> > <servlet-name>faces</servlet-name>
> > </filter-mapping>
> >
> > <filter-mapping>
> > <filter-name>extensionsFilter</filter-name>
> >
> <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
> > </filter-mapping>
> >
> > <servlet>
> > <servlet-name>faces</servlet-name>
> > <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
> > <load-on-startup>2</load-on-startup>
> > </servlet>
> >
> > <servlet-mapping>
> > <servlet-name>faces</servlet-name>
> > <url-pattern>*.html</url-pattern>
> > </servlet-mapping>
> >
> > -------------------
> >
> > With this configuration I have a getScrolling javascript error every time
> I click on a commandLink.
> >
> > any ideas?
> >
> >
> > R.
> >
> >
> >
> >
> >
> > On 5/18/06, Mike Kienenberger <mk...@gmail.com> wrote:
> > > Are you getting errors about the extension filter not being properly
> configured?
> > > The getScrolling function is added to your page html by the extension
> filter.
> > >
> > > On 5/18/06, Ricardo Tercero Lozano < rtercerol@gmail.com> wrote:
> > > >
> > > > Hello,
> > > >
> > > > today I tested my application against myfaces-core-1.1.3 and
> tomahawk-1.1.2
> > > > and I found an issue related to HtmlCommandLink. Every time I click on
> a
> > > > link, a javascript error is generated: getScrolling is not defined.
> > > >
> > > > I'm running tomcat 5.5.15. I've setted extensions filter as shown in
> > > > [MYFACES-1259] and if I set the context-param
> org.apache.myfaces.AUTO_SCROLL
> > > > to true I get the above javascript error.
> > > >
> > > > The only workaround I found is set the context-param to false.
> > > >
> > >
> >
> >
>
>
Re: MYFACES-1259 not resolved? (javascript error: getScrolling is not defined)
Posted by Ricardo Tercero Lozano <rt...@gmail.com>.
I've resolved the problem. I'm using Sitemesh for page decoration. The
matter is extensionsFilter parses the page and mark start and end body and
head positions. If extensions filter is mapped directly to faces servlet it
executes before sitemesh filter and resulting page has no body what avoids
myfaces javascript insertion.
The solution was to put extensions filter mapping before sitemesh filter and
map extensions filter to *.jsf (*.html in my case). This way:
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
Ricardo.
On 5/19/06, Ricardo Tercero Lozano <rt...@gmail.com> wrote:
>
>
> This is my filter configuration in web.xml:
>
> <filter>
> <filter-name>extensionsFilter</filter-name>
> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
>
> <init-param>
> <param-name>uploadRepositoryPath</param-name>
> <param-value>/temp</param-value>
> </init-param>
> <init-param>
> <param-name>maxFileSize</param-name>
> <param-value>2m</param-value>
> </init-param>
> </filter>
>
> <filter-mapping>
> <filter-name>extensionsFilter</filter-name>
> <servlet-name>faces</servlet-name>
> </filter-mapping>
>
> <filter-mapping>
> <filter-name>extensionsFilter</filter-name>
> <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
> </filter-mapping>
>
> <servlet>
> <servlet-name>faces</servlet-name>
> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
> <load-on-startup>2</load-on-startup>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>faces</servlet-name>
> <url-pattern>*.html</url-pattern>
> </servlet-mapping>
>
> -------------------
>
> With this configuration I have a getScrolling javascript error every time
> I click on a commandLink.
>
> any ideas?
>
> R.
>
>
>
>
> On 5/18/06, Mike Kienenberger <mk...@gmail.com> wrote:
> >
> > Are you getting errors about the extension filter not being properly
> > configured?
> > The getScrolling function is added to your page html by the extension
> > filter.
> >
> > On 5/18/06, Ricardo Tercero Lozano < rtercerol@gmail.com> wrote:
> > >
> > > Hello,
> > >
> > > today I tested my application against myfaces-core-1.1.3 and
> > tomahawk-1.1.2
> > > and I found an issue related to HtmlCommandLink. Every time I click on
> > a
> > > link, a javascript error is generated: getScrolling is not defined.
> > >
> > > I'm running tomcat 5.5.15. I've setted extensions filter as shown in
> > > [MYFACES-1259] and if I set the context-param
> > org.apache.myfaces.AUTO_SCROLL
> > > to true I get the above javascript error.
> > >
> > > The only workaround I found is set the context-param to false.
> > >
> >
>
>
Re: MYFACES-1259 not resolved? (javascript error: getScrolling is not defined)
Posted by Ricardo Tercero Lozano <rt...@gmail.com>.
This is my filter configuration in web.xml:
<filter>
<filter-name>extensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter
</filter-class>
<init-param>
<param-name>uploadRepositoryPath</param-name>
<param-value>/temp</param-value>
</init-param>
<init-param>
<param-name>maxFileSize</param-name>
<param-value>2m</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<servlet-name>faces</servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>faces</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>faces</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
-------------------
With this configuration I have a getScrolling javascript error every time I
click on a commandLink.
any ideas?
R.
On 5/18/06, Mike Kienenberger <mk...@gmail.com> wrote:
>
> Are you getting errors about the extension filter not being properly
> configured?
> The getScrolling function is added to your page html by the extension
> filter.
>
> On 5/18/06, Ricardo Tercero Lozano <rt...@gmail.com> wrote:
> >
> > Hello,
> >
> > today I tested my application against myfaces-core-1.1.3 and
> tomahawk-1.1.2
> > and I found an issue related to HtmlCommandLink. Every time I click on a
> > link, a javascript error is generated: getScrolling is not defined.
> >
> > I'm running tomcat 5.5.15. I've setted extensions filter as shown in
> > [MYFACES-1259] and if I set the context-param
> org.apache.myfaces.AUTO_SCROLL
> > to true I get the above javascript error.
> >
> > The only workaround I found is set the context-param to false.
> >
>
Re: MYFACES-1259 not resolved? (javascript error: getScrolling is not defined)
Posted by Mike Kienenberger <mk...@gmail.com>.
Are you getting errors about the extension filter not being properly configured?
The getScrolling function is added to your page html by the extension filter.
On 5/18/06, Ricardo Tercero Lozano <rt...@gmail.com> wrote:
>
> Hello,
>
> today I tested my application against myfaces-core-1.1.3 and tomahawk-1.1.2
> and I found an issue related to HtmlCommandLink. Every time I click on a
> link, a javascript error is generated: getScrolling is not defined.
>
> I'm running tomcat 5.5.15. I've setted extensions filter as shown in
> [MYFACES-1259] and if I set the context-param org.apache.myfaces.AUTO_SCROLL
> to true I get the above javascript error.
>
> The only workaround I found is set the context-param to false.
>