RE: [Shale] Getting the JSF Session Started

2006-03-28 Thread James Reynolds
Oh, OK.  Thanks again, I'm going back under the hood :) 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
McClanahan
Sent: Tuesday, March 28, 2006 5:33 PM
To: Struts Users Mailing List
Subject: Re: [Shale] Getting the JSF Session Started

On 3/28/06, James Reynolds <[EMAIL PROTECTED]> wrote:
>
> Thanks so much for taking the time to do this.  Actually, I do have 
> outputLinks and commandLinks inside the same form  to the JSF books> is that bad practice?


No, that's fine ... I'm just suggesting that temporarily creating a 10
line JSP page without all the extra stuff might help illuminate where
the problems are.

Craig

-Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of 
> Craig McClanahan
> Sent: Tuesday, March 28, 2006 5:12 PM
> To: Struts Users Mailing List
> Subject: Re: [Shale] Getting the JSF Session Started
>
> On 3/28/06, James Reynolds <[EMAIL PROTECTED]>
wrote:
> >
> > (Oh I hope there's nothing stupid here)
>
>
> Nothing obvious stands out (I presume that the "std" thing is loaded 
> in messages.jspx?).  When I run into scenarios like that, I try to get

> to the simplest possible case first (say, a form with a command link 
> and an output link embedded inside) in it, and see that work, before 
> fleshing it back out again.  (Also, of course, check the servlet 
> container logs for any errors.)
>
> Craig
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Shale] Getting the JSF Session Started

2006-03-28 Thread Craig McClanahan
On 3/28/06, James Reynolds <[EMAIL PROTECTED]> wrote:
>
> Thanks so much for taking the time to do this.  Actually, I do have
> outputLinks and commandLinks inside the same form  to the JSF books> is that bad practice?


No, that's fine ... I'm just suggesting that temporarily creating a 10 line
JSP page without all the extra stuff might help illuminate where the
problems are.

Craig

-Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
> McClanahan
> Sent: Tuesday, March 28, 2006 5:12 PM
> To: Struts Users Mailing List
> Subject: Re: [Shale] Getting the JSF Session Started
>
> On 3/28/06, James Reynolds <[EMAIL PROTECTED]> wrote:
> >
> > (Oh I hope there's nothing stupid here)
>
>
> Nothing obvious stands out (I presume that the "std" thing is loaded in
> messages.jspx?).  When I run into scenarios like that, I try to get to
> the simplest possible case first (say, a form with a command link and an
> output link embedded inside) in it, and see that work, before fleshing
> it back out again.  (Also, of course, check the servlet container logs
> for any errors.)
>
> Craig
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: [Shale] Getting the JSF Session Started

2006-03-28 Thread James Reynolds
Thanks so much for taking the time to do this.  Actually, I do have
outputLinks and commandLinks inside the same form  is that bad practice?



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
McClanahan
Sent: Tuesday, March 28, 2006 5:12 PM
To: Struts Users Mailing List
Subject: Re: [Shale] Getting the JSF Session Started

On 3/28/06, James Reynolds <[EMAIL PROTECTED]> wrote:
>
> (Oh I hope there's nothing stupid here)


Nothing obvious stands out (I presume that the "std" thing is loaded in
messages.jspx?).  When I run into scenarios like that, I try to get to
the simplest possible case first (say, a form with a command link and an
output link embedded inside) in it, and see that work, before fleshing
it back out again.  (Also, of course, check the servlet container logs
for any errors.)

Craig


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Shale] Getting the JSF Session Started

2006-03-28 Thread Craig McClanahan
On 3/28/06, James Reynolds <[EMAIL PROTECTED]> wrote:
>
> (Oh I hope there's nothing stupid here)


Nothing obvious stands out (I presume that the "std" thing is loaded in
messages.jspx?).  When I run into scenarios like that, I try to get to the
simplest possible case first (say, a form with a command link and an output
link embedded inside) in it, and see that work, before fleshing it back out
again.  (Also, of course, check the servlet container logs for any errors.)

Craig


RE: [Shale] Getting the JSF Session Started

2006-03-28 Thread James Reynolds
(Oh I hope there's nothing stupid here)

<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"; %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"; %>
<%@ taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"; %>
<%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>


<%@ include file="messages.jspf" %>





















NPP News




http://www.ctconsulting.com/nppsignup.php";
target="_blank"
  onmouseover="self.status = 'Web Seminars'; return
true;"
  onmouseout="self.status = ''; return true;">















Plus

* * *



http://www.myplacetolearn.com/";
target="_blank">






 



























mailto:[EMAIL PROTECTED]">


    





    







 

-----Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
McClanahan
Sent: Tuesday, March 28, 2006 4:39 PM
To: Struts Users Mailing List
Subject: Re: [Shale] Getting the JSF Session Started

On 3/28/06, James Reynolds <[EMAIL PROTECTED]> wrote:
>
> Ah, I was barking up the wrong tree again :)
>
> Thanks for the suggestion.  I do have a messages component on my page 
> and I'm not seeing any errors.  However, I have not implemented a 
> backing bean for this first page (no real need for it yet) so I am 
> seeing the corresponding warnings in the console.  That wouldn't play 
> any part would it?


You mean the warning about not finding a view controller?  No, that's
not part of the picture ... indeed, if you pick up tonight's nightly
build that log message has been demoted from a warning to a debug
message -- it's perfectly legal to not use view controllers.

Also, I do have many navigation commandLinks with the immediate
> attribute set to true in order to bypass the required fields in the 
> login section of the page.  I've read in some posts that it might be 
> desirable to set up the navigation as a result of ActionEvent rather 
> than the action.  Is that true, or am I misinterpreting what I've
read?


I've read the same ... but don't necessarily agree :-).  I use immediate
for either navigation buttons, or for a cancel button.

It'd be helptul to see some code on your JSP page to help figure out
what's really going on.

Thanks again!


Craig

-Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of 
> Craig McClanahan
> Sent: Tuesday, March 28, 2006 4:04 PM
> To: Struts Users Mailing List
> Subject: Re: [Shale] Getting the JSF Session Started
>
> On 3/28/06, James Reynolds <[EMAIL PROTECTED]>
wrote:
> >
> >
> > I'm having to click twice to get a session started.  I based my app 
> > on
>
> > the Shale-blank code, which includes an index.jsp file which 
> > contains a  tag to "welcome.jsf" to, as I understand 
> > it, get a session started in the framework.
>
>
> JSF itself doesn't start the session -- in this particular 
> application, the session is created as a side effect of executing the 
> index.jsp page ... JSP pages always create a session (if it does not 
> exist) unless you declare that you do not want one.
>
> So why the forward in this case?  Because some containers do not 
> correctly support a welcome file name of "welcome.jsf" where there is 
> no actual resource in the webapp at that location.
>
> However, I still need to click twice on command buttons or command 
> links
> > to get any action.  Should I be using a more thorough method to 
> > ensure
>
> > a session begins?
>
>
> Without seeing your code, it's difficult to determine what might be 
> causing the behavior you are seeing, but it seems unlikely to me that 
> session existence has an impact.  One thing to check, though, is if 
> your page is triggering a validation error somehow -- unless you have 
> an  or  component on your page, to show the 
> messages when the page gets redisplayed, this can be a bit puzzling to

> JSF newcomers.
>
> Thanks
>
>
> Craig
>
>
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Shale] Getting the JSF Session Started

2006-03-28 Thread Craig McClanahan
On 3/28/06, James Reynolds <[EMAIL PROTECTED]> wrote:
>
> Ah, I was barking up the wrong tree again :)
>
> Thanks for the suggestion.  I do have a messages component on my page
> and I'm not seeing any errors.  However, I have not implemented a
> backing bean for this first page (no real need for it yet) so I am
> seeing the corresponding warnings in the console.  That wouldn't play
> any part would it?


You mean the warning about not finding a view controller?  No, that's not
part of the picture ... indeed, if you pick up tonight's nightly build that
log message has been demoted from a warning to a debug message -- it's
perfectly legal to not use view controllers.

Also, I do have many navigation commandLinks with the immediate
> attribute set to true in order to bypass the required fields in the
> login section of the page.  I've read in some posts that it might be
> desirable to set up the navigation as a result of ActionEvent rather
> than the action.  Is that true, or am I misinterpreting what I've read?


I've read the same ... but don't necessarily agree :-).  I use immediate for
either navigation buttons, or for a cancel button.

It'd be helptul to see some code on your JSP page to help figure out what's
really going on.

Thanks again!


Craig

-Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
> McClanahan
> Sent: Tuesday, March 28, 2006 4:04 PM
> To: Struts Users Mailing List
> Subject: Re: [Shale] Getting the JSF Session Started
>
> On 3/28/06, James Reynolds <[EMAIL PROTECTED]> wrote:
> >
> >
> > I'm having to click twice to get a session started.  I based my app on
>
> > the Shale-blank code, which includes an index.jsp file which contains
> > a  tag to "welcome.jsf" to, as I understand it, get a
> > session started in the framework.
>
>
> JSF itself doesn't start the session -- in this particular application,
> the session is created as a side effect of executing the index.jsp page
> ... JSP pages always create a session (if it does not exist) unless you
> declare that you do not want one.
>
> So why the forward in this case?  Because some containers do not
> correctly support a welcome file name of "welcome.jsf" where there is no
> actual resource in the webapp at that location.
>
> However, I still need to click twice on command buttons or command links
> > to get any action.  Should I be using a more thorough method to ensure
>
> > a session begins?
>
>
> Without seeing your code, it's difficult to determine what might be
> causing the behavior you are seeing, but it seems unlikely to me that
> session existence has an impact.  One thing to check, though, is if your
> page is triggering a validation error somehow -- unless you have an
>  or  component on your page, to show the messages
> when the page gets redisplayed, this can be a bit puzzling to JSF
> newcomers.
>
> Thanks
>
>
> Craig
>
>
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: [Shale] Getting the JSF Session Started

2006-03-28 Thread James Reynolds
Ah, I was barking up the wrong tree again :)

Thanks for the suggestion.  I do have a messages component on my page
and I'm not seeing any errors.  However, I have not implemented a
backing bean for this first page (no real need for it yet) so I am
seeing the corresponding warnings in the console.  That wouldn't play
any part would it?

Also, I do have many navigation commandLinks with the immediate
attribute set to true in order to bypass the required fields in the
login section of the page.  I've read in some posts that it might be
desirable to set up the navigation as a result of ActionEvent rather
than the action.  Is that true, or am I misinterpreting what I've read?

Thanks again!


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
McClanahan
Sent: Tuesday, March 28, 2006 4:04 PM
To: Struts Users Mailing List
Subject: Re: [Shale] Getting the JSF Session Started

On 3/28/06, James Reynolds <[EMAIL PROTECTED]> wrote:
>
>
> I'm having to click twice to get a session started.  I based my app on

> the Shale-blank code, which includes an index.jsp file which contains 
> a  tag to "welcome.jsf" to, as I understand it, get a 
> session started in the framework.


JSF itself doesn't start the session -- in this particular application,
the session is created as a side effect of executing the index.jsp page
... JSP pages always create a session (if it does not exist) unless you
declare that you do not want one.

So why the forward in this case?  Because some containers do not
correctly support a welcome file name of "welcome.jsf" where there is no
actual resource in the webapp at that location.

However, I still need to click twice on command buttons or command links
> to get any action.  Should I be using a more thorough method to ensure

> a session begins?


Without seeing your code, it's difficult to determine what might be
causing the behavior you are seeing, but it seems unlikely to me that
session existence has an impact.  One thing to check, though, is if your
page is triggering a validation error somehow -- unless you have an
 or  component on your page, to show the messages
when the page gets redisplayed, this can be a bit puzzling to JSF
newcomers.

Thanks


Craig


-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Shale] Getting the JSF Session Started

2006-03-28 Thread Craig McClanahan
On 3/28/06, James Reynolds <[EMAIL PROTECTED]> wrote:
>
>
> I'm having to click twice to get a session started.  I based my app on
> the Shale-blank code, which includes an index.jsp file which contains a
>  tag to "welcome.jsf" to, as I understand it, get a session
> started in the framework.


JSF itself doesn't start the session -- in this particular application, the
session is created as a side effect of executing the index.jsp page ... JSP
pages always create a session (if it does not exist) unless you declare that
you do not want one.

So why the forward in this case?  Because some containers do not correctly
support a welcome file name of "welcome.jsf" where there is no actual
resource in the webapp at that location.

However, I still need to click twice on command buttons or command links
> to get any action.  Should I be using a more thorough method to ensure a
> session begins?


Without seeing your code, it's difficult to determine what might be causing
the behavior you are seeing, but it seems unlikely to me that session
existence has an impact.  One thing to check, though, is if your page is
triggering a validation error somehow -- unless you have an  or
 component on your page, to show the messages when the page gets
redisplayed, this can be a bit puzzling to JSF newcomers.

Thanks


Craig


-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>