admin@glassfish.java.net

Code fix for 4226, 4237

From: Irfan Ahmed <irfan_at_sun.com>
Date: Tue, 26 Feb 2008 16:30:30 +0530

Hi Anissa and Ken,

The bugs 4226
<https://glassfish.dev.java.net/issues/show_bug.cgi?id=4226> and 4237
<https://glassfish.dev.java.net/issues/show_bug.cgi?id=4237> are failing
because of the same issue where the variable for edit is set in the
attribute and not in the pageSession. This causes it to throw a NPE when
the page is processed after display, i.e., when the OK button is clicked.

I am attaching a fix for both the bugs and if you are OK with the fix I
will go ahead and check it in.

Thanks and Warm Rgds
Irfan.
-- 
Irfan Ahmed
9180-66927726, Sun Microsystems Inc., Bangalore, India.


Index: configuration/httpListenerEdit.jsf
===================================================================
RCS file: /cvs/glassfish/admin-gui/src/docroot/configuration/httpListenerEdit.jsf,v
retrieving revision 1.4
diff -u -r1.4 httpListenerEdit.jsf
--- configuration/httpListenerEdit.jsf 6 Jun 2007 07:53:49 -0000 1.4
+++ configuration/httpListenerEdit.jsf 26 Feb 2008 10:57:37 -0000
@@ -36,7 +36,7 @@
 <!-- configuration/httpListenerEdit.jsf -->
 
 <!initPage
- setAttribute(key="edit" value="#{true}" )
+ setPageSessionAttribute(key="edit" value="#{true}" )
 />
 <sun:page id="page1">
     <!beforeCreate
Index: configuration/httpListenerNew.jsf
===================================================================
RCS file: /cvs/glassfish/admin-gui/src/docroot/configuration/httpListenerNew.jsf,v
retrieving revision 1.2
diff -u -r1.2 httpListenerNew.jsf
--- configuration/httpListenerNew.jsf 5 May 2007 05:27:09 -0000 1.2
+++ configuration/httpListenerNew.jsf 26 Feb 2008 10:57:37 -0000
@@ -35,7 +35,7 @@
 -->
 <!-- configuration/httpListenerNew.jsf -->
 <!initPage
-setAttribute(key="edit" value="#{false}" )
+ setPageSessionAttribute(key="edit" value="#{false}" )
 />
 <sun:page id="page1">
     <!beforeCreate
Index: resourceNode/jdbcResourceNew.jsf
===================================================================
RCS file: /cvs/glassfish/admin-gui/src/docroot/resourceNode/jdbcResourceNew.jsf,v
retrieving revision 1.2
diff -u -r1.2 jdbcResourceNew.jsf
--- resourceNode/jdbcResourceNew.jsf 5 May 2007 05:27:42 -0000 1.2
+++ resourceNode/jdbcResourceNew.jsf 26 Feb 2008 10:57:37 -0000
@@ -37,7 +37,7 @@
 <!-- resourceNode/jdbcResourceNew.jsf -->
 
 <!initPage
- setAttribute(key="edit" value="#{false}");
+ setPageSessionAttribute(key="edit" value="#{false}");
 />
     
 <sun:page id="page1">