[wsas-java-dev] svn commit r2442 - in
trunk/wsas/java/modules/www/extensions/core: . js xslt
svn at wso2.org
svn at wso2.org
Thu May 10 11:08:43 PDT 2007
Author: chamil
Date: Thu May 10 11:08:37 2007
New Revision: 2442
Modified:
trunk/wsas/java/modules/www/extensions/core/divs.html
trunk/wsas/java/modules/www/extensions/core/js.html
trunk/wsas/java/modules/www/extensions/core/js/data_service.js
trunk/wsas/java/modules/www/extensions/core/xslt/data_service.xsl
Log:
Some more code in the database service front end. Will commit every thing in once I have cleaned up the code. This is a commit is for backing up the code, so that it will not be lost. [Just in case :-) ] .
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 Thu May 10 11:08:37 2007
@@ -113,5 +113,6 @@
<!-- For rampart security scenario configurations -->
<div id="divUtRelated" style="display:none;"></div>
-<div id="divKeystoreRelated" style="display:none;"></div>
+<div id="divKeystoreRelated" style="display:none;"></div>
+<div id="divDataServiceDetails" style="display:none;"></div>
Modified: trunk/wsas/java/modules/www/extensions/core/js.html
==============================================================================
--- trunk/wsas/java/modules/www/extensions/core/js.html (original)
+++ trunk/wsas/java/modules/www/extensions/core/js.html Thu May 10 11:08:37 2007
@@ -17,4 +17,5 @@
<script language="javascript" src="extensions/core/js/xmlTree.js"></script>
<script language="javascript" src="extensions/core/js/security.js"></script>
<script language="javascript" src="extensions/core/js/msgflows.js"></script>
-<script language="javascript" src="extensions/core/js/graphs.js"></script>
\ No newline at end of file
+<script language="javascript" src="extensions/core/js/graphs.js"></script>
+<script language="javascript" src="extensions/core/js/data_service.js"></script>
\ No newline at end of file
Modified: trunk/wsas/java/modules/www/extensions/core/js/data_service.js
==============================================================================
--- trunk/wsas/java/modules/www/extensions/core/js/data_service.js (original)
+++ trunk/wsas/java/modules/www/extensions/core/js/data_service.js Thu May 10 11:08:37 2007
@@ -1,6 +1,101 @@
// This will have all the functionality for data services.
function configureDataservice(serviceName){
+
+
+ getDataServiceContents(serviceName);
+
+
+ /*stopping the refreshing first */
+/* stoppingRefreshingMethodsHook();
+
+ serviceSpecificName = serviceName;
+ lastUsedServiceId = serviceName;
+ // need to see the output to write the xsl
+ var xsltFileName = "";
+ var body_xml = '<ns1:getDataServiceContents xmlns:ns1="http://org.apache.axis2/xsd">\n' +
+ ' <arg0>' + serviceName + '</arg0>\n' +
+ ' <arg1>' + serviceName + '</arg1>\n' +
+ ' </ns1:listAllOperations>\n';
+
+ var callURL = serverURL + "/" + "OperationAdmin" + "/" + "listAllOperations";
+ send("listAllOperations", body_xml, "", callURL, "", false, listAllOperationsCallback);
+ */
+}
+
+
+
+
+
+/*function getDataServiceContents(serviceName) {
+
+ var body_xml = '<req:getDataServiceContents xmlns:req="http://org.apache.axis2/xsd">\n' +
+ ' <arg0>' + serviceName + '</arg0>\n' +
+ ' </req:getAxisConfigDataRequest>\n';
+
+ var callURL = serverURL + "/" + "DataServiceAdmin" + "/getDataServiceContents" ;
+
+ send("getAxisConfigData", body_xml, "msg_flows_graphic.xsl", callURL, document.getElementById("divAxisFlowChain"), false);
+}*/
+
+function getDataServiceContents(serviceName) {
+
+ var body_xml = '<req:getDataServiceContents xmlns:req="http://org.apache.axis2/xsd">\n' +
+ ' <arg0>' + serviceName + '</arg0>\n' +
+ ' </req:getAxisConfigDataRequest>\n';
+
+ var callURL = serverURL + "/" + "DataServiceAdmin" + "/getDataServiceContents" ;
+
+ send("getAxisConfigData", body_xml, "data_service.xsl", callURL, document.getElementById("divDataServiceDetails"), false);
+ //send("getAxisConfigData", body_xml, "", callURL, "", false, getDataServiceContentsCallback);
+}
+
+function getDataServiceContentsCallback(){
+ if (!onError()) {
+ return;
+ }
+
+
+ var objNodeList = xhReq.responseXML.getElementsByTagName("return");
+ for (var i=0; i<objNodeList.length; i++) {
+ alert(xmlSerializerToString(objNodeList.item(i)));
+ }
+
+ alert(xhReq.responseXML.getElementsByTagName("data").length);
+ var dataObj = xhReq.responseXML.getElementsByTagName("data").item(0);
+ alert(xmlSerializerToString(dataObj));
+
+}
+
+
+/*function listAllOperations(serviceName) {
+
+}
+
+function listAllOperationsCallback() {
+ if (!onError()) {
+ return;
+ }
+ callbackhelper("list_operations.xsl", document.getElementById("divListAllOperations"));
+ showlistOperationsHeader(document.getElementById('listOperationsHeader'));
+}*/
+
+
+function createDataServiceXML(){
+ var xmlObj = document.createElement("data");
+ var configObj = document.createElement("config");
+ configObj.appendChild(createPropelement("org.wso2.ws.dataservice.driver", ""));
+ configObj.appendChild(createPropelement("org.wso2.ws.dataservice.protocol", ""));
+ configObj.appendChild(createPropelement("org.wso2.ws.dataservice.user", ""));
+ configObj.appendChild(createPropelement("org.wso2.ws.dataservice.password", ""));
+
+}
+
+function createPropelement(propName, propValue){
+ var propObj = document.createElement("property");
+ property.appendChild(document.createTextNode(propValue));
+ property.setAttribute(propName);
+ return propObj;
}
\ No newline at end of file
Modified: trunk/wsas/java/modules/www/extensions/core/xslt/data_service.xsl
==============================================================================
--- trunk/wsas/java/modules/www/extensions/core/xslt/data_service.xsl (original)
+++ trunk/wsas/java/modules/www/extensions/core/xslt/data_service.xsl Thu May 10 11:08:37 2007
@@ -9,60 +9,105 @@
<xsl:variable name="serviceName"><xsl:value-of select="return/name"/></xsl:variable>
<xsl:variable name="webResourcesFound"><xsl:value-of select="return/foundWebResources"/></xsl:variable>-->
<fieldset style="border:none;">
- <div id="formset">
- <xsl:for-each select="return">
- <table class="styledLeft">
- <thead><tr><th colspan="2">Configuration</th></tr></thead>
- <xsl:for-each select="config">
- <tr>
- <th>
- <xsl:value-of select="name"/>
- </th>
- <td>
- <xsl:value-of select="value"/>
- </td>
- </tr>
- <tr>
- <td colspan="2"><input type="button" value="Add New" onclick="javascript:alert("Add new configuration");return false;"/></td>
- </tr>
- </xsl:for-each>
- </table>
- <table class="styledLeft">
- <thead><tr><th colspan="2">Operations</th></tr></thead>
- <xsl:for-each select="operations">
- <tr>
- <th>
- <xsl:value-of select="name"/>
- </th>
- <td>
- <xsl:value-of select="value"/>
- </td>
- </tr>
- <tr>
- <td colspan="2"><input type="button" value="Add New" onclick="javascript:alert("Add new Operations");return false;"/></td>
- </tr>
- </xsl:for-each>
- </table>
- <table class="styledLeft">
- <thead><tr><th colspan="2">Queries</th></tr></thead>
- <xsl:for-each select="queries">
- <tr>
- <th>
- <xsl:value-of select="name"/>
- </th>
- <td>
- <xsl:value-of select="value"/>
- </td>
- </tr>
- <tr>
- <td colspan="2"><input type="button" value="Add New" onclick="javascript:alert("Add new Queries");return false;"/></td>
- </tr>
- </xsl:for-each>
- </table>
- </xsl:for-each>
+ <div id="formset">
+ <xsl:for-each select="return/data">
+ <form>
+ <fieldset>
+ <legend>Configuration</legend>
+ <xsl:for-each select="config/property">
+ <div>
+ <label style="width: 30%;"><xsl:value-of select="@name"/></label>
+ <input type="text">
+ <xsl:attribute name="size">50</xsl:attribute>
+ <xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute>
+ <xsl:attribute name="id"><xsl:value-of select="@name"/></xsl:attribute>
+ </input>
+ </div>
+ </xsl:for-each>
+ <div class="buttonrow">
+ <label></label><input type="button" value="Add New">
+ <xsl:attribute name="onclick">javascript:alert("Add new configuration peoperty");return false;</xsl:attribute>
+ </input>
+ </div>
+ </fieldset>
+ </form>
+
+ <form>
+ <fieldset>
+ <legend>Operations</legend>
+ <xsl:for-each select="operation">
+ <div>
+ <label>
+ <xsl:value-of select="@name"/>
+ </label>
+ <label>
+ <a alt="Edit">
+ <xsl:attribute name="title">Edit Operation <xsl:value-of select="@id"/></xsl:attribute>
+ <xsl:attribute name="onclick">javascript:alert("Edit Operation ");return false;</xsl:attribute>
+ <xsl:attribute name="id">edit_link</xsl:attribute>
+ <xsl:attribute name="href">#</xsl:attribute>
+ <xsl:text>        </xsl:text>
+ </a>
+ <a alt="Remove">
+ <xsl:attribute name="title">Remove Operation <xsl:value-of select="@id"/></xsl:attribute>
+ <xsl:attribute name="onclick">javascript:alert("Remove Operation ");return false;</xsl:attribute>
+ <xsl:attribute name="id">cancel_link</xsl:attribute>
+ <xsl:attribute name="href">#</xsl:attribute>
+ <xsl:text>        </xsl:text>
+ </a>
+ </label>
+ </div>
+ </xsl:for-each>
+ <div class="buttonrow">
+ <label></label><input type="button" value="Add New">
+ <xsl:attribute name="onclick">javascript:alert("Add new configuration peoperty");return false;</xsl:attribute>
+ </input>
+ </div>
+ </fieldset>
+ </form>
+
+
+ <form>
+ <fieldset>
+ <legend>Queries</legend>
+ <xsl:for-each select="query">
+ <div>
+ <label>
+ <xsl:value-of select="@id"/>
+ </label>
+ <label>
+ <a alt="Edit">
+ <xsl:attribute name="title">Edit query <xsl:value-of select="@id"/></xsl:attribute>
+ <xsl:attribute name="onclick">javascript:alert("Edit query ");return false;</xsl:attribute>
+ <xsl:attribute name="id">edit_link</xsl:attribute>
+ <xsl:attribute name="href">#</xsl:attribute>
+ <xsl:text>    </xsl:text>
+ </a>
+ <a alt="Remove">
+ <xsl:attribute name="title">Remove query <xsl:value-of select="@id"/></xsl:attribute>
+ <xsl:attribute name="onclick">javascript:alert("Remove query ");return false;</xsl:attribute>
+ <xsl:attribute name="id">cancel_link</xsl:attribute>
+ <xsl:attribute name="href">#</xsl:attribute>
+ <xsl:text>    </xsl:text>
+ </a>
+ </label>
+ </div>
+ </xsl:for-each>
+ <div class="buttonrow">
+ <input type="button" value="Add New">
+ <xsl:attribute name="onclick">javascript:alert("Add new configuration peoperty");return false;</xsl:attribute>
+ </input>
+ </div>
+ </fieldset>
+ </form>
+ </xsl:for-each>
</div>
- <div id="formset">
- <p><input type="button" value="Generate" onclick="javascript:alert("Generate was clicked.");"/></p>
+ <div id="formset">
+ <div style="align: right;">
+ <input type="button" value="Generate">
+ <xsl:attribute name="onclick">javascript:alert("Generate was clicked.");</xsl:attribute>
+ </input>
+ </div>
</div>
</fieldset>
</xsl:template>
More information about the Wsas-java-dev
mailing list