You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by ch...@gmx.net on 2005/03/13 18:33:06 UTC

No source code in MyFaces examples

Hello,

all the provided MyFaces examples (from http://cvs.apache.org/dist/incubator/myfaces/builds/, e.g. myfaces-1.0.8-examples.gz) just
include the class files (e.g. form beans or action listeners), but no java files.
Isn't it the purpose of these examples to demonstrate, how to use MyFaces? Of course there is source code of JSP's (the view part),
but isn't it just as important to know, how the model part is implemented?
Now I've decompiled the classes to see this model part - but is this really the intention? Or is there a different place, where you
can get example packages including source files?

Thanks,
Chily


RE: No source code in MyFaces examples

Posted by ch...@gmx.net.
Thanks a lot!
Martin also just told me, that the file
http://cvs.apache.org/dist/incubator/myfaces/builds/myfaces-1.0.8-src.tgz
contains all the examples as well.

Chily


-----Original Message-----
From: Sean Schofield [mailto:sean.schofield@gmail.com]
Sent: Sunday, March 13, 2005 8:44 PM
To: MyFaces Discussion
Subject: Re: No source code in MyFaces examples


No better time than the present.  Here is a good link to get you started:

http://apache.org/dev/version-control.html

sean


On Sun, 13 Mar 2005 19:00:12 +0100, chilydev@gmx.net <ch...@gmx.net> wrote:
> Good idea, thanks.
> I'm not really familiar with cvs, but I'm afraid, I have to get through that.
>
> Chily
>
>
> -----Original Message-----
> From: Martin Marinschek [mailto:martin.marinschek@gmail.com]
> Sent: Sunday, March 13, 2005 6:39 PM
> To: MyFaces Discussion
> Subject: Re: No source code in MyFaces examples
>
> Why not check out the sources from the apache-incubator source tree?
>
> regards,
>
> Martin
>
> On Sun, 13 Mar 2005 18:33:06 +0100, chilydev@gmx.net <ch...@gmx.net> wrote:
> > Hello,
> >
> > all the provided MyFaces examples (from http://cvs.apache.org/dist/incubator/myfaces/builds/, e.g. myfaces-1.0.8-examples.gz)
just
> > include the class files (e.g. form beans or action listeners), but no java files.
> > Isn't it the purpose of these examples to demonstrate, how to use MyFaces? Of course there is source code of JSP's (the view
> part),
> > but isn't it just as important to know, how the model part is implemented?
> > Now I've decompiled the classes to see this model part - but is this really the intention? Or is there a different place, where
> you
> > can get example packages including source files?
> >
> > Thanks,
> > Chily
> >
> >
>
>



Re: No source code in MyFaces examples

Posted by Sean Schofield <se...@gmail.com>.
No better time than the present.  Here is a good link to get you started:

http://apache.org/dev/version-control.html

sean


On Sun, 13 Mar 2005 19:00:12 +0100, chilydev@gmx.net <ch...@gmx.net> wrote:
> Good idea, thanks.
> I'm not really familiar with cvs, but I'm afraid, I have to get through that.
> 
> Chily
> 
> 
> -----Original Message-----
> From: Martin Marinschek [mailto:martin.marinschek@gmail.com]
> Sent: Sunday, March 13, 2005 6:39 PM
> To: MyFaces Discussion
> Subject: Re: No source code in MyFaces examples
> 
> Why not check out the sources from the apache-incubator source tree?
> 
> regards,
> 
> Martin
> 
> On Sun, 13 Mar 2005 18:33:06 +0100, chilydev@gmx.net <ch...@gmx.net> wrote:
> > Hello,
> >
> > all the provided MyFaces examples (from http://cvs.apache.org/dist/incubator/myfaces/builds/, e.g. myfaces-1.0.8-examples.gz) just
> > include the class files (e.g. form beans or action listeners), but no java files.
> > Isn't it the purpose of these examples to demonstrate, how to use MyFaces? Of course there is source code of JSP's (the view
> part),
> > but isn't it just as important to know, how the model part is implemented?
> > Now I've decompiled the classes to see this model part - but is this really the intention? Or is there a different place, where
> you
> > can get example packages including source files?
> >
> > Thanks,
> > Chily
> >
> >
> 
>

Re: Strange navigation in MyFaces examples

Posted by David Geary <sa...@earthlink.net>.
I'm using Shale in a commercial application. I haven't encountered any 
bugs, so it's stable enough for me.


david

Le Mar 14, 2005, à 11:56 AM, Craig McClanahan a écrit :

> On Mon, 14 Mar 2005 19:30:50 +0100, chilydev@gmx.net 
> <ch...@gmx.net> wrote:
>> P.S. @Craig: Is it possible/reasonable to use StrutsShale already, 
>> since there are no stable builds so far?
>
> It is *possible* to use Shale already -- indeed, I would appreciate it
> if people would try this out and provide feedback.  You can get to
> nightly builds from the links on:
>
>   http://wiki.apache.org/struts/StrutsShale
>
> There is no formal EA build yet (although such a build would have no
> different real life quality than an arbitrary nightly build).  Just be
> aware that the APIs for Shale are still under development, and subject
> to change.  That's particularly true with the "DialogController"
> stuff.
>
> I'm not anticipating that ViewController will change much unless user
> feedback indicates that there are usability problems that need to be
> addressed.
>
> Craig
>


Re: Strange navigation in MyFaces examples

Posted by Craig McClanahan <cr...@gmail.com>.
On Mon, 14 Mar 2005 19:30:50 +0100, chilydev@gmx.net <ch...@gmx.net> wrote:
> P.S. @Craig: Is it possible/reasonable to use StrutsShale already, since there are no stable builds so far?

It is *possible* to use Shale already -- indeed, I would appreciate it
if people would try this out and provide feedback.  You can get to
nightly builds from the links on:

  http://wiki.apache.org/struts/StrutsShale

There is no formal EA build yet (although such a build would have no
different real life quality than an arbitrary nightly build).  Just be
aware that the APIs for Shale are still under development, and subject
to change.  That's particularly true with the "DialogController"
stuff.

I'm not anticipating that ViewController will change much unless user
feedback indicates that there are usability problems that need to be
addressed.

Craig

RE: Strange navigation in MyFaces examples

Posted by ch...@gmx.net.
> The key is that the prerender() method of the ViewController bean
> associated with your productlist.jsp page is called, just before
> rendering, no matter how you navigated to it (or where you came from).
>  This is the right place to do the database search that actually
> populates the product list table that is being generated.

Ok, that's a good thing about another issue - when having several target page options for one action.
But the problem I mentioned is having several source page (where the call comes from) options for one action. Every source page has
it's own form bean which validates the source form. But Struts accepts just one form bean per action (or with StrutsShale one form
bean per target form).
But you actually need one form bean per source form as well.
The way JSF does it - with the form bean associated with the form, not with the action - would be perfect.

I know, this is the wrong place to discuss Struts issues, but I still hope there is a way to solve this problem just with JSF.

Once again - is it possible to choose the navigation case through the URL instead of a parameter, to get a real connection (usually
1:1) between request URL and response output?
I would be surprised, if this use case is not very common and if JSF (or Struts) would not provide a solution for this.

Thanks,
Chily


P.S. @Craig: Is it possible/reasonable to use StrutsShale already, since there are no stable builds so far?



-----Original Message-----
From: Craig McClanahan [mailto:craigmcc@gmail.com]
Sent: Monday, March 14, 2005 6:18 AM
To: MyFaces Discussion
Subject: Re: Strange navigation in MyFaces examples


On Mon, 14 Mar 2005 00:27:19 +0100, chilydev@gmx.net <ch...@gmx.net> wrote:
>
> 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.

This particular use case benefits from one of the features of the
Shale framework (my proposal for the future of Struts), which is based
on JSF.  Starting point:

  http://wiki.apache.org/struts/StrutsShale

The key is that the prerender() method of the ViewController bean
associated with your productlist.jsp page is called, just before
rendering, no matter how you navigated to it (or where you came from).
 This is the right place to do the database search that actually
populates the product list table that is being generated.

Craig



-----Original Message-----
From: chilydev@gmx.net [mailto:chilydev@gmx.net]
Sent: Monday, March 14, 2005 12:27 AM
To: MyFaces Discussion
Subject: RE: Strange navigation in MyFaces examples



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:martin.marinschek@gmail.com]
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 <ss...@o2.pl> 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:martin.marinschek@gmail.com]
> > 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, chilydev@gmx.net <ch...@gmx.net>
> > 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


Re: Strange navigation in MyFaces examples

Posted by Craig McClanahan <cr...@gmail.com>.
On Mon, 14 Mar 2005 00:27:19 +0100, chilydev@gmx.net <ch...@gmx.net> wrote:
> 
> 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.

This particular use case benefits from one of the features of the
Shale framework (my proposal for the future of Struts), which is based
on JSF.  Starting point:

  http://wiki.apache.org/struts/StrutsShale

The key is that the prerender() method of the ViewController bean
associated with your productlist.jsp page is called, just before
rendering, no matter how you navigated to it (or where you came from).
 This is the right place to do the database search that actually
populates the product list table that is being generated.

Craig

RE: Strange navigation in MyFaces examples

Posted by ch...@gmx.net.
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:martin.marinschek@gmail.com]
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 <ss...@o2.pl> 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:martin.marinschek@gmail.com]
> > 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, chilydev@gmx.net <ch...@gmx.net>
> > 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
> >>
> >>
> >
> >
> >
>
>



Re: Strange navigation in MyFaces examples

Posted by Martin Marinschek <ma...@gmail.com>.
well, that is a lot of traffic overhead you are generating there ;)

regards,

Martin


On Sun, 13 Mar 2005 22:22:26 +0100, Slawek <ss...@o2.pl> 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:martin.marinschek@gmail.com]
> > 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, chilydev@gmx.net <ch...@gmx.net>
> > 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
> >>
> >>
> >
> >
> >
> 
>

Re: Strange navigation in MyFaces examples

Posted by Slawek <ss...@o2.pl>.
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:martin.marinschek@gmail.com]
> 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, chilydev@gmx.net <ch...@gmx.net> 
> 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
>>
>>
>
>
>



RE: Strange navigation in MyFaces examples

Posted by ch...@gmx.net.
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:martin.marinschek@gmail.com]
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, chilydev@gmx.net <ch...@gmx.net> 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
>
>



Re: Strange navigation in MyFaces examples

Posted by Martin Marinschek <ma...@gmail.com>.
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, chilydev@gmx.net <ch...@gmx.net> 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
> 
>

Strange navigation in MyFaces examples

Posted by ch...@gmx.net.
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


RE: No source code in MyFaces examples

Posted by ch...@gmx.net.
Good idea, thanks.
I'm not really familiar with cvs, but I'm afraid, I have to get through that.

Chily


-----Original Message-----
From: Martin Marinschek [mailto:martin.marinschek@gmail.com]
Sent: Sunday, March 13, 2005 6:39 PM
To: MyFaces Discussion
Subject: Re: No source code in MyFaces examples


Why not check out the sources from the apache-incubator source tree?

regards,

Martin


On Sun, 13 Mar 2005 18:33:06 +0100, chilydev@gmx.net <ch...@gmx.net> wrote:
> Hello,
>
> all the provided MyFaces examples (from http://cvs.apache.org/dist/incubator/myfaces/builds/, e.g. myfaces-1.0.8-examples.gz) just
> include the class files (e.g. form beans or action listeners), but no java files.
> Isn't it the purpose of these examples to demonstrate, how to use MyFaces? Of course there is source code of JSP's (the view
part),
> but isn't it just as important to know, how the model part is implemented?
> Now I've decompiled the classes to see this model part - but is this really the intention? Or is there a different place, where
you
> can get example packages including source files?
>
> Thanks,
> Chily
>
>



Re: No source code in MyFaces examples

Posted by Martin Marinschek <ma...@gmail.com>.
Why not check out the sources from the apache-incubator source tree?

regards,

Martin


On Sun, 13 Mar 2005 18:33:06 +0100, chilydev@gmx.net <ch...@gmx.net> wrote:
> Hello,
> 
> all the provided MyFaces examples (from http://cvs.apache.org/dist/incubator/myfaces/builds/, e.g. myfaces-1.0.8-examples.gz) just
> include the class files (e.g. form beans or action listeners), but no java files.
> Isn't it the purpose of these examples to demonstrate, how to use MyFaces? Of course there is source code of JSP's (the view part),
> but isn't it just as important to know, how the model part is implemented?
> Now I've decompiled the classes to see this model part - but is this really the intention? Or is there a different place, where you
> can get example packages including source files?
> 
> Thanks,
> Chily
> 
>