Develop and Download Open Source Software

Browse CVS Repository

Diff of /pal/s2helloworld/src/main/java/jp/sf/pal/s2helloworld/web/hello/SayHelloPage.java

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1 by shinsuke, Sun Nov 26 01:44:54 2006 UTC revision 1.2 by shinsuke, Mon Apr 2 01:01:03 2007 UTC
# Line 7  public class SayHelloPage Line 7  public class SayHelloPage
7    
8      private String yourName;      private String yourName;
9    
10        private FacesContext facesContext;
11    
12      public String getYourName()      public String getYourName()
13      {      {
14          return yourName;          return yourName;
# Line 17  public class SayHelloPage Line 19  public class SayHelloPage
19          this.yourName = yourName;          this.yourName = yourName;
20      }      }
21    
22        /**
23         * @return the facesContext
24         */
25        public FacesContext getFacesContext()
26        {
27            return facesContext;
28        }
29    
30        /**
31         * @param facesContext the facesContext to set
32         */
33        public void setFacesContext(FacesContext facesContext)
34        {
35            this.facesContext = facesContext;
36        }
37    
38      public String initialize()      public String initialize()
39      {      {
40          return null;          return null;
# Line 24  public class SayHelloPage Line 42  public class SayHelloPage
42    
43      public String prerender()      public String prerender()
44      {      {
45          yourName = (String) FacesContext.getCurrentInstance()          yourName = (String) facesContext.getExternalContext().getSessionMap()
46                  .getExternalContext().getSessionMap().get("name");                  .get("name");
47          return null;          return null;
48      }      }
49    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26