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 jsp:forward 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 h:message or h:messages 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]
RE: [Shale] Getting the JSF Session Started
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 jsp:forward 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 h:message or h:messages 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
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 jsp:forward 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 h:message or h:messages 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
(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 % f:view %@ include file=messages.jspf % html head titleh:outputText value=#{std.title}//title t:stylesheet path=/resources/standard.css/ script type=text/javascript src=resources/js.js/script head body t:htmlTag value=div id=container forceId=true f:subview id=header c:import url=includes/header.jspx/ /f:subview t:htmlTag value=div styleClass=content div id=news h:form h1NPP News/h1 h5h:outputText value=#{std['welcome.base.h1']}//h5 ph:outputText value=#{std['welcome.base.p1'] }/ h:outputLink value=http://www.ctconsulting.com/nppsignup.php; target=_blank onmouseover=self.status = 'Web Seminars'; return true; onmouseout=self.status = ''; return true; h:outputText value=click here/ /h:outputLink/p hr/ h5h:outputText value=#{std['welcome.base.h2']}//h5 ph:outputText value=#{std['welcome.base.p2']} / h:commandLink action=go_nppRegister value=click here onmouseover=self.status = 'Register'; return true; onmouseout=self.status = ''; return true; immediate=true//p hr/ h5h:outputText value=#{std['welcome.base.h3']}//h5 ph:outputText value=#{std['welcome.base.p3']} / !--todo: code this action-- h:commandLink action= value=click here onmouseover=self.status = 'Mission, Goals Purpose'; return true; onmouseout=self.status = ''; return true; immediate=true//p hr/ h2Plus/h2 h3* * */h3 !--todo: code this action-- h3h:commandLink value=About Membership action= immediate=true onmouseover=self.status = 'About Membership'; return true; onmouseout=self.status = ''; return true;//h3 h3h:outputLink value=http://www.myplacetolearn.com/; target=_blank h:outputText value=NPP E-Learning Center/ /h:outputLink/h3 !--todo: code this action-- h3h:commandLink value=Vendor Applications action= immediate=true onmouseover=self.status = 'Vendor Applications'; return true; onmouseout=self.status = ''; return true;//h3 h3h:commandLink value=Testimonials action=go_testimonials immediate=true onmouseover=self.status = 'Testimonials'; return true; onmouseout=self.status = ''; return true;//h3 h4nbsp;/h4 /div /h:form t:htmlTag value=div h1 h:outputText value=#{std['welcome.h1']}/ /h1 p h:outputText value=#{std['welcome.p1']}/ /p /t:htmlTag t:htmlTag value=div p h:outputText value=#{std['welcome.p2']}/ /p p h:outputText value=#{std['welcome.p3']}/ /p p h:outputText value=#{std['welcome.p4']} / h:outputLink value=mailto:[EMAIL PROTECTED] h:outputText value=[EMAIL PROTECTED]/ /h:outputLink /p /t:htmlTag /t:htmlTag f:subview id=footer c:import url=includes/footer.jspx/ /f:subview /t:htmlTag /body /html /f:view -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
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
RE: [Shale] Getting the JSF Session Started
Thanks so much for taking the time to do this. Actually, I do have outputLinks and commandLinks inside the same form sound of scrambling to the JSF books 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
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 sound of scrambling 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
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 sound of scrambling 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]