admin@glassfish.java.net

please review : changes for Sailfin components in the GF code

From: Irfan Ahmed <Irfan.Ahmed_at_Sun.COM>
Date: Fri, 26 Oct 2007 02:21:58 +0530
Hi,

I have made changes to the following files. The changes and files are as follows:
  1. peTree.jsf
    1. remove the SIP treeNode and updated the SIPTreeAdaptor to set the rendered property as specified in the dynamicTreeNodes. 
    2. Set the rendered property for the sipModules and convergedSipModules to be dynamically picked up depending on whether the SIP extensions are present or not.
  2. SIPTreeAdaptor.java
    1. I have updated the getFactoryOptions to set the rendered property after reading the same from the descriptor. if this is not done then the rendered property of the parent container UI component is always used.
  3. applications.jsf
    1. Added links for SIP Modules and Converged SIP Modules. These are shown only if SIP extensions are available.
  4. configuration.jsf
    1. Added links for SIP Service. More will follow.
Thanks and Warm Rgds,
Irfan
--
<a class="moz-txt-link-abbreviated" href="mailto:irfan@sun.com">irfan@sun.com</a>
Irfan Ahmed | Sun Microsystems Inc., Bangalore, India. | irfan@sun.com - 9180.66927726 - x27726

Index: src/docroot/peTree.jsf
===================================================================
RCS file: /cvs/glassfish/admin-gui/src/docroot/peTree.jsf,v
retrieving revision 1.12.6.2
diff -u -w -r1.12.6.2 peTree.jsf
--- src/docroot/peTree.jsf 16 Oct 2007 02:45:17 -0000 1.12.6.2
+++ src/docroot/peTree.jsf 25 Oct 2007 20:48:49 -0000
@@ -233,17 +233,6 @@
                     </facet>
                 </dynamicTreeNode>
                 
- <sun:treeNode id="sipApplications"
- text="$resource{sip.sipApps.label}"
- url="/sip/applications/sipApplications.jsf"
- target="main"
- expanded="$boolean{false}"
- rendered="#{SipConfigBean.enabled}"
- >
- <!facet image>
- <sun:iconHyperlink id="abc" icon="TREE_FOLDER" url="/sip/applications/sipApplications.jsf" target="main" border="$int{0}" immediate="$boolean{true}" />
- </facet>
-
                     <dynamicTreeNode id="sipModules"
                         treeAdaptorClass="com.sun.extensions.comms.SIPTreeAdaptor"
                         treeAdaptorListType="sipModules"
@@ -258,6 +247,7 @@
                         childTarget="main"
                         childExpanded="$boolean{false}"
                         childURL="sip/applications/sipModuleEdit.jsf?appName=#{$this{valueBinding}.text}&hasContextRoot=false"
+ rendered="#{SipConfigBean.enabled}"
>
                         <!facet image>
                             <sun:iconHyperlink id="abc" icon="TREE_FOLDER" url="/sip/applications/sipModules.jsf"
@@ -280,6 +270,7 @@
                          childTarget="main"
                          childExpanded="$boolean{false}"
                          childURL="sip/applications/sipModuleEdit.jsf?appName=#{$this{valueBinding}.text}&hasContextRoot=true"
+ rendered="#{SipConfigBean.enabled}"
>
                         <!facet image>
                         <sun:iconHyperlink id="abc" icon="TREE_FOLDER" url="/sip/applications/convergedSipModules.jsf"
@@ -288,7 +279,6 @@
                         <!filterTree filterSystemApps() />
                     </dynamicTreeNode>
                 </sun:treeNode>
- </sun:treeNode>
             
                 
 
Index: src/java/com/sun/extensions/comms/SIPTreeAdaptor.java
===================================================================
RCS file: /cvs/glassfish/admin-gui/src/java/com/sun/extensions/comms/Attic/SIPTreeAdaptor.java,v
retrieving revision 1.1.2.1
diff -u -w -r1.1.2.1 SIPTreeAdaptor.java
--- src/java/com/sun/extensions/comms/SIPTreeAdaptor.java 16 Oct 2007 02:39:49 -0000 1.1.2.1
+++ src/java/com/sun/extensions/comms/SIPTreeAdaptor.java 25 Oct 2007 20:48:49 -0000
@@ -297,6 +297,7 @@
             // CommandEvent.
             setProperty(props, "actionListener", desc.getOption("actionListener"));
             setProperty(props, "expanded", desc.getOption("expanded"));
+ setProperty(props, "rendered", desc.getOption("rendered"));
         } else {
             // This case deals with the children
             
@@ -346,6 +347,7 @@
                     setProperty(props, "serverName", serverName);
             }
             setProperty(props, "expanded", desc.getOption("childExpanded"));
+ setProperty(props, "rendered", desc.getOption("rendered"));
         }
         
         // Return the options
Index: src/docroot/applications/applications.jsf
===================================================================
RCS file: /cvs/glassfish/admin-gui/src/docroot/applications/applications.jsf,v
retrieving revision 1.4
diff -u -w -r1.4 applications.jsf
--- src/docroot/applications/applications.jsf 5 May 2007 05:26:59 -0000 1.4
+++ src/docroot/applications/applications.jsf 25 Oct 2007 20:48:49 -0000
@@ -39,6 +39,9 @@
      <!beforeCreate
      setResourceBundle(key="i18n" bundle="com.sun.enterprise.tools.admingui.resources.Strings")
      setResourceBundle(key="help" bundle="com.sun.enterprise.tools.admingui.resources.Helplinks")
+ if(#{SipConfigBean.enabled}) {
+ setResourceBundle(key="sip" bundle="org.jvnet.glassfish.comms.admin.gui.extensions.resources.Strings")
+ }
      />
 #include "shared/restart.inc"
      <sun:html>
@@ -104,6 +107,22 @@
                                  <sun:staticText text="&nbsp; $resource{i18n.tree.appclientModules}" />
                              </sun:hyperlink>
                          </sun:property>
+ <sun:property rendered="#{SipConfigBean.enabled}">
+ <sun:hyperlink
+ toolTip="$resource{sip.sipApps.sipModulesTooltip}"
+ url="/sip/applications/sipModules.jsf" >
+ <sun:image url="/resource/images/webModule.gif" />
+ <sun:staticText text="&nbsp; $resource{sip.sipModules.label}" />
+ </sun:hyperlink>
+ </sun:property>
+ <sun:property rendered="#{SipConfigBean.enabled}">
+ <sun:hyperlink
+ toolTip="$resource{sip.sipApps.convergedSipModulesTooltip}"
+ url="/sip/applications/convergedSipModules.jsf" >
+ <sun:image url="/resource/images/webModule.gif" />
+ <sun:staticText text="&nbsp; $resource{sip.convergedSipModules.label}" />
+ </sun:hyperlink>
+ </sun:property>
                      </sun:propertySheetSection >
                  </sun:propertySheet>
                  <sun:hidden id="helpKey" value="$resource{help.applications}" />
Index: src/docroot/configuration/configuration.jsf
===================================================================
RCS file: /cvs/glassfish/admin-gui/src/docroot/configuration/configuration.jsf,v
retrieving revision 1.5
diff -u -w -r1.5 configuration.jsf
--- src/docroot/configuration/configuration.jsf 5 May 2007 05:27:08 -0000 1.5
+++ src/docroot/configuration/configuration.jsf 25 Oct 2007 20:48:50 -0000
@@ -47,6 +47,9 @@
         if ($session{supportCluster} & !${isServerConfig}){
             setPageSessionAttribute(key="showIt" value="$boolean{true}");
         }
+ if(#{SipConfigBean.enabled}){
+ setResourceBundle(key="sip" bundle="org.jvnet.glassfish.comms.admin.gui.extensions.resources.Strings")
+ }
     />
 #include "shared/restart.inc"
     <sun:html>
@@ -147,6 +150,16 @@
                             </sun:hyperlink>
                           
                         </sun:property>
+
+ <sun:property rendered="#{SipConfigBean.enabled}">
+ <sun:hyperlink
+ toolTip="$resource{sip.sipService.tooltip}"
+ url="/sip/configuration/sipService.jsf?configName=#{configName}" >
+ <sun:image url="/resource/images/http.gif" />
+ <sun:staticText text="$resource{sip.sipService}" />
+ </sun:hyperlink>
+ </sun:property>
+
                         <sun:property>
                         
                         <sun:hyperlink