You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Matthias Kahlau <mk...@web.de> on 2006/01/30 02:50:12 UTC

Custom ViewHandler - problem with navigation

Hi!


I'm implementing a custom view handler and encounter problems with the
navigation. The view handler is responsible for handling pure code-level
Java views and delegates the rendering of JSP pages to the default view
handler.

Because of the Java views, I don't have any files to specify in the
faces-config.xml navigation rules. When I use an outcome for a Java view,
the navigation handler says that it cannot find a matching navigation case,
and stays on the current view:

outcome=ParticipationView no matching navigation-case found, staying on
current ViewRoot


Does anybody of you know how to handle that?


Regards,

Matthias


Re: getScrolling() missing in new nightly build

Posted by Mike Kienenberger <mk...@gmail.com>.
I recommend looking at the new web page, and not using url-pattern at all.

http://myfaces.apache.org/tomahawk/extensionsFilter.html


On 1/30/06, frohman@pacbell.net <fr...@pacbell.net> wrote:
> I had a mistake in the filter-mapping entry.
> Thanks.
>
> There is an error on the myfaces page for filter extensions.
> in the filter section, the <description> tag should be before
> the <param-name> tag. And the </ url-pattern> end tag should
> be </url-pattern>.
>
> For those that cut and paste it.
>
> -----Original Message-----
> From: Bruno Aranda [mailto:brunoaranda@gmail.com]
> Sent: Monday, January 30, 2006 1:16 AM
> To: MyFaces Discussion; frohman@pacbell.net
> Subject: Re: getScrolling() missing in new nightly build
>
> Do you have the extensionsFilter configured in your web.xml file?
>
> Regards,
>
> Bruno
>
> 2006/1/30, frohman@pacbell.net <fr...@pacbell.net>:
> > For my application, I built the nightly build from Jan 23, and my
> > application worked. I built the build from last night, but I am
> > getting an error because the javascript function getScrolling() is
> missing.
> > The Jan 23 build produces
> >
> > <script type="text/javascript"><!--
> > function getScrolling() {
> >     var x = 0; var y = 0;
> > . . .
> >     return x + "," + y;
> > }
> >
> > //--></script>
> >
> > after the </html>
> > but the Jan 28 does not.
> >
> >
> >
>
>

RE: getScrolling() missing in new nightly build

Posted by fr...@pacbell.net.
I had a mistake in the filter-mapping entry.
Thanks.

There is an error on the myfaces page for filter extensions.
in the filter section, the <description> tag should be before
the <param-name> tag. And the </ url-pattern> end tag should
be </url-pattern>.

For those that cut and paste it.

-----Original Message-----
From: Bruno Aranda [mailto:brunoaranda@gmail.com] 
Sent: Monday, January 30, 2006 1:16 AM
To: MyFaces Discussion; frohman@pacbell.net
Subject: Re: getScrolling() missing in new nightly build

Do you have the extensionsFilter configured in your web.xml file?

Regards,

Bruno

2006/1/30, frohman@pacbell.net <fr...@pacbell.net>:
> For my application, I built the nightly build from Jan 23, and my 
> application worked. I built the build from last night, but I am 
> getting an error because the javascript function getScrolling() is
missing.
> The Jan 23 build produces
>
> <script type="text/javascript"><!--
> function getScrolling() {
>     var x = 0; var y = 0;
> . . .
>     return x + "," + y;
> }
>
> //--></script>
>
> after the </html>
> but the Jan 28 does not.
>
>
>


Re: getScrolling() missing in new nightly build

Posted by Bruno Aranda <br...@gmail.com>.
Do you have the extensionsFilter configured in your web.xml file?

Regards,

Bruno

2006/1/30, frohman@pacbell.net <fr...@pacbell.net>:
> For my application, I built the nightly build from Jan 23, and my
> application worked. I built the build from last night, but I am getting
> an error because the javascript function getScrolling() is missing.
> The Jan 23 build produces
>
> <script type="text/javascript"><!--
> function getScrolling() {
>     var x = 0; var y = 0;
> . . .
>     return x + "," + y;
> }
>
> //--></script>
>
> after the </html>
> but the Jan 28 does not.
>
>
>

getScrolling() missing in new nightly build

Posted by fr...@pacbell.net.
For my application, I built the nightly build from Jan 23, and my
application worked. I built the build from last night, but I am getting
an error because the javascript function getScrolling() is missing.
The Jan 23 build produces

<script type="text/javascript"><!--
function getScrolling() {
    var x = 0; var y = 0;
. . .
    return x + "," + y;
}

//--></script>

after the </html>
but the Jan 28 does not.



AW: Custom ViewHandler - problem with navigation

Posted by Matthias Kahlau <mk...@web.de>.
Hi Frank Felix!


My navigation works now, I've implemented a custom navigation handler. Many
thanks for your hint.


Regards,

Matthias

> -----Ursprungliche Nachricht-----
> Von: users-return-16145-mkahlau=web.de@myfaces.apache.org
> [mailto:users-return-16145-mkahlau=web.de@myfaces.apache.org]Im Auftrag
> von Frank Felix Debatin
> Gesendet: Montag, 30. Januar 2006 10:01
> An: 'MyFaces Discussion'
> Betreff: RE: Custom ViewHandler - problem with navigation
>
>
> Hi Matthias,
>
> I'm not an expert in the inner workings of JSF, views and navigation.
>
> But here is what works for me. I never understood the sense of the xml
> navigation rules, and because we have a very large application with many
> pages, we were fed up typing in the navigation rules, and forgetting them
> from time to time.
>
> Thus, I took the myfaces implementation of the navigation
> handler, threw out
> all the xml navigation rule stuff, and used it as a custom navigation
> handler, that moves forward without looking for a rule.
>
> Essentially the navigation handler does the following things. Is is a
> redirect? If yes do a redirect via the external context. If no, call
> viewhandler create view, set the view id, call faces context set
> view root,
> and then render response.
>
> Long text, short message: try doing your own navigation handler. It's
> simple, and we were very happy with that, because we got a lot
> more control.
>
>
> Regards
> Frank Felix
>
> -----Original Message-----
> From: mkahlau@web.de [mailto:mkahlau@web.de]
> Sent: Monday, January 30, 2006 2:50 AM
> To: Users MyFaces
> Subject: Custom ViewHandler - problem with navigation
>
> Hi!
>
>
> I'm implementing a custom view handler and encounter problems with the
> navigation. The view handler is responsible for handling pure code-level
> Java views and delegates the rendering of JSP pages to the default view
> handler.
>
> Because of the Java views, I don't have any files to specify in the
> faces-config.xml navigation rules. When I use an outcome for a Java view,
> the navigation handler says that it cannot find a matching
> navigation case,
> and stays on the current view:
>
> outcome=ParticipationView no matching navigation-case found, staying on
> current ViewRoot
>
>
> Does anybody of you know how to handle that?
>
>
> Regards,
>
> Matthias
>
>


RE: Custom ViewHandler - problem with navigation

Posted by Frank Felix Debatin <ff...@gmx.net>.
Hi Matthias, 

I'm not an expert in the inner workings of JSF, views and navigation. 

But here is what works for me. I never understood the sense of the xml
navigation rules, and because we have a very large application with many
pages, we were fed up typing in the navigation rules, and forgetting them
from time to time. 

Thus, I took the myfaces implementation of the navigation handler, threw out
all the xml navigation rule stuff, and used it as a custom navigation
handler, that moves forward without looking for a rule. 

Essentially the navigation handler does the following things. Is is a
redirect? If yes do a redirect via the external context. If no, call
viewhandler create view, set the view id, call faces context set view root,
and then render response. 

Long text, short message: try doing your own navigation handler. It's
simple, and we were very happy with that, because we got a lot more control.


Regards
Frank Felix

-----Original Message-----
From: mkahlau@web.de [mailto:mkahlau@web.de] 
Sent: Monday, January 30, 2006 2:50 AM
To: Users MyFaces
Subject: Custom ViewHandler - problem with navigation

Hi!


I'm implementing a custom view handler and encounter problems with the
navigation. The view handler is responsible for handling pure code-level
Java views and delegates the rendering of JSP pages to the default view
handler.

Because of the Java views, I don't have any files to specify in the
faces-config.xml navigation rules. When I use an outcome for a Java view,
the navigation handler says that it cannot find a matching navigation case,
and stays on the current view:

outcome=ParticipationView no matching navigation-case found, staying on
current ViewRoot


Does anybody of you know how to handle that?


Regards,

Matthias