[Carbon-dev] svn commit r31551 - in branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main: java/org/wso2/carbon/dataservices/ui/beans resources/web/ds/js
sumedha at wso2.com
sumedha at wso2.com
Wed Feb 25 02:36:01 PST 2009
Author: sumedha
Date: Wed Feb 25 02:36:00 2009
New Revision: 31551
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=31551
Log:
fix for CARBON-3301 & removed password check in datasource screen
Modified:
branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/java/org/wso2/carbon/dataservices/ui/beans/Data.java
branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/js/ui-validations.js
Modified: branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/java/org/wso2/carbon/dataservices/ui/beans/Data.java
URL: http://wso2.org/svn/browse/wso2/branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/java/org/wso2/carbon/dataservices/ui/beans/Data.java?rev=31551&r1=31550&r2=31551&view=diff
==============================================================================
--- branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/java/org/wso2/carbon/dataservices/ui/beans/Data.java (original)
+++ branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/java/org/wso2/carbon/dataservices/ui/beans/Data.java Wed Feb 25 02:36:00 2009
@@ -167,15 +167,29 @@
while(queryElements.hasNext()){
OMElement queryEle = (OMElement)queryElements.next();
OMElement sqlEle = queryEle.getFirstChildWithName(new QName("sql"));
-
- query = new Query();
+ OMElement excelEle = queryEle.getFirstChildWithName(new QName("excel"));
+
+ query = new Query();
query.setId(queryEle.getAttributeValue(new QName("id")));
query.setConfigToUse(queryEle.getAttributeValue(new QName("useConfig")));
-
- if(sqlEle != null){
+
+ if(sqlEle != null){
query.setSql(sqlEle.getText());
}
- Param[] params = getParams(queryEle.getChildrenWithName(new QName("param")));
+ if(excelEle != null){
+ ExcelQuery excelQuery = new ExcelQuery();
+ OMElement workBookName = excelEle.getFirstChildWithName(new QName("workbookname"));
+ excelQuery.setWorkBookName(workBookName.getText());
+ OMElement hasHeader = excelEle.getFirstChildWithName(new QName("hasheader"));
+ excelQuery.setHasHeaders(hasHeader.getText());
+ OMElement startingRow = excelEle.getFirstChildWithName(new QName("startingrow"));
+ excelQuery.setStartingRow(startingRow.getText());
+ OMElement maxRowCount = excelEle.getFirstChildWithName(new QName("maxrowcount"));
+ excelQuery.setMaxRowCount(maxRowCount.getText());
+ query.setExcel(excelQuery);
+ }
+
+ Param[] params = getParams(queryEle.getChildrenWithName(new QName("param")));
query.setParams(params);
//populating result
Modified: branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/js/ui-validations.js
URL: http://wso2.org/svn/browse/wso2/branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/js/ui-validations.js?rev=31551&r1=31550&r2=31551&view=diff
==============================================================================
--- branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/js/ui-validations.js (original)
+++ branches/carbon/1.5.1/trunk/carbon-components/data-services/org.wso2.carbon.dataservices.ui/src/main/resources/web/ds/js/ui-validations.js Wed Feb 25 02:36:00 2009
@@ -31,10 +31,10 @@
CARBON.showWarningDialog('User Name is mandatory');
return false;
}
- if(document.getElementById('org.wso2.ws.dataservice.password').value == ''){
- CARBON.showWarningDialog('Password is mandatory');
- return false;
- }
+ //if(document.getElementById('org.wso2.ws.dataservice.password').value == ''){
+ // CARBON.showWarningDialog('Password is mandatory');
+ // return false;
+ //}
if(document.getElementById('org.wso2.ws.dataservice.minpoolsize').value.match(/^[a-zA-Z]+$/)){
CARBON.showWarningDialog('Enter numeric values to Min. Pool Size');
return false;
More information about the Carbon-dev
mailing list