[wsas-java-dev] svn commit r3573 - in trunk/wsas/java/modules/www/extensions/core: . js xslt

svn at wso2.org svn at wso2.org
Wed Jun 6 05:01:10 PDT 2007


Author: sumedha
Date: Wed Jun  6 05:00:56 2007
New Revision: 3573

Added:
   trunk/wsas/java/modules/www/extensions/core/xslt/add_new_pojo_service.xsl
   trunk/wsas/java/modules/www/extensions/core/xslt/add_new_spring_service.xsl
Modified:
   trunk/wsas/java/modules/www/extensions/core/divs.html
   trunk/wsas/java/modules/www/extensions/core/js/services.js
   trunk/wsas/java/modules/www/extensions/core/xslt/list_services.xsl
Log:
changed the main service listing screen.Now there are seperate screens for each type of service addition

Modified: trunk/wsas/java/modules/www/extensions/core/divs.html
==============================================================================
--- trunk/wsas/java/modules/www/extensions/core/divs.html	(original)
+++ trunk/wsas/java/modules/www/extensions/core/divs.html	Wed Jun  6 05:00:56 2007
@@ -121,3 +121,5 @@
 <div id="divDataServiceDisplayConfig" style="display:none;"></div>
 
 <div id="divEJBProvider" style="display:none;"></div>
+<div id="divNewPOJOService" style="display:none;"></div>
+<div id="divNewSpringService" style="display:none;"></div>

Modified: trunk/wsas/java/modules/www/extensions/core/js/services.js
==============================================================================
--- trunk/wsas/java/modules/www/extensions/core/js/services.js	(original)
+++ trunk/wsas/java/modules/www/extensions/core/js/services.js	Wed Jun  6 05:00:56 2007
@@ -1795,3 +1795,35 @@
         wso2.wsf.Util.callbackhelper(this.req.responseXML,"ejb_provider_class_selection_wizard.xsl",document.getElementById("divDynamicService"));
     });
 }
+
+//functions to call different type of service creation screens
+function showPOJOArchieveUploadScreen() {
+    var tmpTransformationNode;
+    if (window.XMLHttpRequest && !wso2.wsf.Util.isIE()) {
+        tmpTransformationNode =
+        document.implementation.createDocument("", "serviceUploadTemplate", null);
+    } else if (window.ActiveXObject) {
+        tmpTransformationNode = new ActiveXObject("Microsoft.XmlDom");
+        var sXml = "<serviceUploadTemplate></serviceUploadTemplate>";
+        tmpTransformationNode.loadXML(sXml);
+    }
+    var objDiv = document.getElementById("divNewPOJOService");
+    wso2.wsf.Util.processXML(tmpTransformationNode, "add_new_pojo_service.xsl", objDiv);
+    wso2.wsf.Util.showOnlyOneMain(objDiv);
+}
+
+
+function showSpringArchieveUploadScreen() {
+    var tmpTransformationNode;
+    if (window.XMLHttpRequest && !wso2.wsf.Util.isIE()) {
+        tmpTransformationNode =
+        document.implementation.createDocument("", "springServiceUploadTemplate", null);
+    } else if (window.ActiveXObject) {
+        tmpTransformationNode = new ActiveXObject("Microsoft.XmlDom");
+        var sXml = "<springServiceUploadTemplate></springServiceUploadTemplate>";
+        tmpTransformationNode.loadXML(sXml);
+    }
+    var objDiv = document.getElementById("divNewSpringService");
+    wso2.wsf.Util.processXML(tmpTransformationNode, "add_new_spring_service.xsl", objDiv);
+    wso2.wsf.Util.showOnlyOneMain(objDiv);
+}

Added: trunk/wsas/java/modules/www/extensions/core/xslt/add_new_pojo_service.xsl
==============================================================================
--- (empty file)
+++ trunk/wsas/java/modules/www/extensions/core/xslt/add_new_pojo_service.xsl	Wed Jun  6 05:00:56 2007
@@ -0,0 +1,26 @@
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+    <xsl:template match="serviceUploadTemplate" xmlns="http://www.w3.org/1999/xhtml">
+        <h4><a href="#" onClick="javascript:showServiceInitializer(); return false;">Services</a>&#160;&gt;&#160;New POJO Service</h4>
+    	<div id="formset">
+	<form method="post"  name="serviceUpload" action="fileupload/service" enctype="multipart/form-data" target="globalIFrame">
+	<br/>
+                <fieldset>
+                    <legend>Upload a New Service (.aar, .jar, .zip or .dbs)</legend>
+                    <div>
+                        <label for="module_a">Service archive (.aar,.jar,.zip,.dbs):</label><input type="file" id="filename" name="filename" size="50"/>
+                    </div>
+                    <div class="buttonrow">
+                        <input name="upload" type="submit" value=" Upload ">
+                            <xsl:attribute name="onclick">javascript: if (document.serviceUpload.filename.value == '') { wso2.wsf.Util.alertWarning('Please select a file before clicking upload.'); return false;} else { stoppingRefreshingMethodsHook(); return true;}</xsl:attribute>
+                        </input>
+                    </div>
+		</fieldset>
+
+	</form>
+	</div>
+    </xsl:template>
+
+
+</xsl:stylesheet>

Added: trunk/wsas/java/modules/www/extensions/core/xslt/add_new_spring_service.xsl
==============================================================================
--- (empty file)
+++ trunk/wsas/java/modules/www/extensions/core/xslt/add_new_spring_service.xsl	Wed Jun  6 05:00:56 2007
@@ -0,0 +1,29 @@
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+    <xsl:template match="springServiceUploadTemplate" xmlns="http://www.w3.org/1999/xhtml">
+        <h4><a href="#" onClick="javascript:showServiceInitializer(); return false;">Services</a>&#160;&gt;&#160;New Spring Service</h4>
+    	<div id="formset">
+        <form method="post"  name="springUpload" action="fileupload/spring" enctype="multipart/form-data" target="globalIFrame">
+	<br/>
+                <fieldset>
+                    <legend>Upload a New Spring Service (.xml and .jar)</legend>
+                    <div for="spring_a">
+                        <label>Spring Context (.xml) :</label><input type="file" id="springContext" name="springContext" size="50"/>
+                    </div>
+                    <div><br/></div>
+                    <div for="sprng_b">
+                        <label>Spring Beans (.jar) :</label><input type="file" id="springBeans" name="springBeans" size="50"/>
+                    </div>
+                    <div class="buttonrow">
+                        <input name="upload" type="submit" value=" Upload ">
+                            <xsl:attribute name="onclick">javascript: if (document.springUpload.springContext.value == '' || document.springUpload.springBeans.value == '') { wso2.wsf.Util.alertWarning('Please select required fields to upload spring service'); return false;} else { stoppingRefreshingMethodsHook(); return true;}</xsl:attribute>
+                        </input>
+                    </div>
+                </fieldset>
+          </form>
+	</div>
+    </xsl:template>
+
+
+</xsl:stylesheet>

Modified: trunk/wsas/java/modules/www/extensions/core/xslt/list_services.xsl
==============================================================================
--- trunk/wsas/java/modules/www/extensions/core/xslt/list_services.xsl	(original)
+++ trunk/wsas/java/modules/www/extensions/core/xslt/list_services.xsl	Wed Jun  6 05:00:56 2007
@@ -27,76 +27,81 @@
         </table>
         
         <fieldset style="border:none;">
-        <div id="listServicesInformation">
-            <p>Refreshing service list...</p>
-        </div>
-
-        <div id="faultyServices" style="display:none;"></div>
-        <p>&#160;</p>
-            <div id="formsetWrapper">
-                <div id="formset">
-                    <xsl:call-template name="serviceUploadTemplate"/>
-                    <xsl:call-template name="springUploadTemplate"/>
-                </div>
-            </div>
-
+	        <div id="faultyServices" style="display:none;"></div>
+	        <div id="formsetWrapper">
+			<div id="formset">
+	                    <xsl:call-template name="addNewServicesTemplate"/>
+	                </div>
+		</div>
+	        <p>&#160;</p>
+	        <div id="listServicesInformation">
+	            <p>Refreshing service list...</p>
+	        </div>
         </fieldset>
     </xsl:template>
 
-    <xsl:template name="serviceUploadTemplate">
-            <form method="post"  name="serviceUpload" action="fileupload/service" enctype="multipart/form-data" target="globalIFrame">
-                <fieldset>
-                    <legend>Upload a New Service (.aar, .jar, .zip or .dbs)</legend>
-                    <div>
-                        <label for="module_a">Service archive (.aar,.jar,.zip,.dbs):</label><input type="file" id="filename" name="filename" size="50"/>
-                    </div>
-                    <div class="buttonrow">
-                        <input name="upload" type="submit" value=" Upload ">
-                            <xsl:attribute name="onclick">javascript: if (document.serviceUpload.filename.value == '') { wso2.wsf.Util.alertWarning('Please select a file before clicking upload.'); return false;} else { stoppingRefreshingMethodsHook(); return true;}</xsl:attribute>
-                        </input>
-                    </div>
-		    <div><br/></div>
-	   	    <div>
-   			<label for="module_a"><a alt="Add New Data Service" >
-   				<xsl:attribute name="title">Add new Data Service</xsl:attribute>
-				<xsl:attribute name="style">white-space:nowrap;</xsl:attribute>
-   				<xsl:attribute name="href">#</xsl:attribute>
-   				<xsl:attribute name="id">add_link</xsl:attribute>
-   				<xsl:attribute name="onclick">javascript:addNewDataService();return false;</xsl:attribute>
-   				<xsl:text>&#160;&#160;&#160;&#160;&#160;New Data Service</xsl:text>
-   			</a></label>
-	       	    </div>
-	   	    <div>
-   			<label for="module_a"><a alt="Add New EJB Service">
-   				<xsl:attribute name="title">Add new EJB Service</xsl:attribute>
-				<xsl:attribute name="style">white-space:nowrap;</xsl:attribute>
-   				<xsl:attribute name="href">#</xsl:attribute>
-   				<xsl:attribute name="id">add_link</xsl:attribute>
-   				<xsl:attribute name="onclick">javascript:ejbProviderConfig();return false;</xsl:attribute>
-   				<xsl:text>&#160;&#160;&#160;&#160;&#160;New EJB Service</xsl:text>
-   			</a></label>
-	       	   </div>
-                </fieldset>
-             </form>
-    </xsl:template>
 
-    <xsl:template name="springUploadTemplate">
-        <form method="post"  name="springUpload" action="fileupload/spring" enctype="multipart/form-data" target="globalIFrame">
-                <fieldset>
-                    <legend>Upload a New Spring Service (.xml and .jar)</legend>
-                    <div for="spring_a">
-                        <label>Spring Context (.xml) :</label><input type="file" id="springContext" name="springContext" size="50"/>
-                    </div>
-                    <div><br/></div>
-                    <div for="sprng_b">
-                        <label>Spring Beans (.jar) :</label><input type="file" id="springBeans" name="springBeans" size="50"/>
-                    </div>
-                    <div class="buttonrow">
-                        <input name="upload" type="submit" value=" Upload ">
-                            <xsl:attribute name="onclick">javascript: if (document.springUpload.springContext.value == '' || document.springUpload.springBeans.value == '') { wso2.wsf.Util.alertWarning('Please select required fields to upload spring service'); return false;} else { stoppingRefreshingMethodsHook(); return true;}</xsl:attribute>
-                        </input>
-                    </div>
-                </fieldset>
-          </form>
+    <xsl:template name="addNewServicesTemplate">
+    	<div id="formset">
+		<form>
+	                <fieldset>
+	                    <legend>Add new ...</legend>
+				<div>
+			                <table style="border:none;">
+			                    <tbody>
+		                            <tr>
+		                                <td>
+							<a alt="POJO Service" >
+				   				<xsl:attribute name="title">POJO Service</xsl:attribute>
+								<xsl:attribute name="style">white-space:nowrap;</xsl:attribute>
+				   				<xsl:attribute name="href">#</xsl:attribute>
+				   				<xsl:attribute name="id">add_link</xsl:attribute>
+				   				<xsl:attribute name="onclick">javascript:showPOJOArchieveUploadScreen();return false;</xsl:attribute>
+				   				<xsl:text>&#160;&#160;&#160;&#160;&#160;POJO Service</xsl:text>
+				   			</a>
+						</td>
+					    </tr>
+		                            <tr>
+		                                <td>
+							<a alt="Spring Service (Spring Context | Spring Bean)" >
+				   				<xsl:attribute name="title">Spring Service (Spring Context | Spring Bean)</xsl:attribute>
+								<xsl:attribute name="style">white-space:nowrap;</xsl:attribute>
+   								<xsl:attribute name="href">#</xsl:attribute>
+				   				<xsl:attribute name="id">add_link</xsl:attribute>
+   								<xsl:attribute name="onclick">javascript:showSpringArchieveUploadScreen();return false;</xsl:attribute>
+   								<xsl:text>&#160;&#160;&#160;&#160;&#160;Spring Service (Spring Context | Spring Bean)</xsl:text>
+				   			</a>
+						</td>
+					    </tr>
+                        		    <tr>
+		                                <td>
+							<a alt="Data Service" >
+   								<xsl:attribute name="title">Data Service</xsl:attribute>
+								<xsl:attribute name="style">white-space:nowrap;</xsl:attribute>
+   								<xsl:attribute name="href">#</xsl:attribute>
+				   				<xsl:attribute name="id">add_link</xsl:attribute>
+   								<xsl:attribute name="onclick">javascript:addNewDataService();return false;</xsl:attribute>
+   								<xsl:text>&#160;&#160;&#160;&#160;&#160;Data Service</xsl:text>
+				   			</a>
+                                		</td>
+					    </tr>
+                		            <tr>
+		                                <td>
+							<a alt="Service based on EJB" >
+				   				<xsl:attribute name="title">Service based on EJB</xsl:attribute>
+								<xsl:attribute name="style">white-space:nowrap;</xsl:attribute>
+				   				<xsl:attribute name="href">#</xsl:attribute>
+				   				<xsl:attribute name="id">add_link</xsl:attribute>
+				   				<xsl:attribute name="onclick">javascript:ejbProviderConfig();return false;</xsl:attribute>
+				   				<xsl:text>&#160;&#160;&#160;&#160;&#160;Service based on EJB</xsl:text>
+				   			</a>
+						</td>
+					    </tr>
+					    </tbody>
+					</table>
+				</div>
+	                </fieldset>
+		</form>
+	</div>
     </xsl:template>
 </xsl:stylesheet>




More information about the Wsas-java-dev mailing list