Yes, that looks like a solution for (rare) additional cases, but not for the usual success or failure case. Using a response redirect for every request really is quite a lot traffic overhead.
The way Struts is dealing with this navigation issue, looks quite satisfying. There the URL actually chooses the navigation case / action (e.g. "/productlist.do"). So using the Struts-JSF-integration-library (Struts-Faces) seems like a solution. But with Struts - and Struts-Faces as well - there comes the next problem: There the form bean is associated with the action, not with the form, as with JSF. So e.g. you have an action, which shows a product list, called through URL "/productlist.do". This URL/action can be called from a menu, from a book detail form (when saving) and from a cd detail form (saving). So it doesn't make sense to associate this action with one specific form bean since there are already two different beans used with this call (and one call using no bean at all). Connecting the bean directly to the form (like JSF does) would be perfect. Struts-Faces uses the action-formbean-connection, like Struts does. So whichever way I use, there is always a problem. Ok, I'm quite new to Struts and JSF - maybe I'm wrong or maybe there is a solution having the navigation case / action chosen through the URL and having the form bean connected to the form at the same time. Does anyone have an idea about this? Thanks, Chily -----Original Message----- From: Martin Marinschek [mailto:[EMAIL PROTECTED] Sent: Sunday, March 13, 2005 10:33 PM To: MyFaces Discussion Subject: Re: Strange navigation in MyFaces examples well, that is a lot of traffic overhead you are generating there ;) regards, Martin On Sun, 13 Mar 2005 22:22:26 +0100, Slawek <[EMAIL PROTECTED]> wrote: > there IS solution to see actual url (not previous)! > > <navigation-case> > <from-outcome>somme_string</from-outcome> > <to-view-id>/somme_page.jsp</to-view-id> > <redirect/> > </navigation-case> > > notice redirect tag... > its slower than without that tag but less confusing:P > > > Slawek > > > > Hi Martin, > > > > thanks for your fast answers :-) > > > > True, that the displayed page depends on the servlet's flexible redirect > > mechanism. > > But in most cases, you just have the distinction between success and > > failure anyways. And in the failure case it wouldn't matter to > > have an URL pointing to the success page, but actually displaying an > > error page. > > > > Selecting the "navigation case" (see faces config xml) through the page > > URL instead of a query parameter would help already. But > > that's not possible, right? > > > > Chily > > > > > > > > > > > > > > -----Original Message----- > > From: Martin Marinschek [mailto:[EMAIL PROTECTED] > > Sent: Sunday, March 13, 2005 7:48 PM > > To: MyFaces Discussion > > Subject: Re: Strange navigation in MyFaces examples > > > > > > No, as far as I know of, this is the one and only navigation concept > > of JSF, and it can cause major troubles for example in security > > filters.... > > > > But there is no way around that if you don't want to specify the next > > page the user gets to already in the html the user receives - the way > > JSF does it, the next page depends on where the faces-servlet > > redirects you to. > > > > regards, > > > > Martin > > > > On Sun, 13 Mar 2005 19:42:29 +0100, [EMAIL PROTECTED] <[EMAIL PROTECTED]> > > wrote: > >> Hello, > >> > >> trying the MyFaces examples myfaces-1.0.8-examples.gz, I've noticed > >> it's strange navigation: > >> The URL you see in the browser's address bar has nothing to do with the > >> actually displayed JSP. Instead of that, the URL is > > actually > >> always pointing to the previously called JSP - where the call to the > >> current JSP comes from. > >> > >> I know where this comes from: The form tags don't define an action - so > >> they point to the current page itself. > >> And I see, what actually defines the target of each call: The (hidden) > >> post parameter "_link_hidden_". > >> > >> So the JSF controller servlet doesn't actually care, which URL is > >> called - it just regards the mentioned parameter. > >> This kind of navigation seems quite confusing to me. > >> > >> One of the three most important reasons for using JSF is to make > >> navigation clearer (besides the model/view seperation and the > >> provided components). > >> E.g. defining the whole application's navigation just in xml files, > >> which can be used with graphical tools, is a great advantage. > >> > >> But I think it's most important to have a clear relation between URL of > >> a page and it's content. E.g. just think of the > >> searchability through a search engine. > >> > >> I'm new to JSF, so my question: > >> Is this the (one-and-only) navigation concept of JSF, or is this a > >> special thing about MyFaces, and there alternative concepts as > >> well? > >> (I didn't find any alternatives so far.) > >> > >> Thanks, > >> Chily > >> > >> > > > > > > > >

