use of org.pentaho.ui.xul.components.XulTreeCell in project pentaho-kettle by pentaho.
the class DataHandler method getConnectionSpecificInfo.
private void getConnectionSpecificInfo(DatabaseMeta meta) {
// Hostname:
if (hostNameBox != null) {
meta.setHostname(hostNameBox.getValue());
}
// Database name:
if (databaseNameBox != null) {
meta.setDBName(databaseNameBox.getValue());
}
// Username:
if (userNameBox != null) {
meta.setUsername(userNameBox.getValue());
}
// Password:
if (passwordBox != null) {
meta.setPassword(passwordBox.getValue());
}
if (databaseDialectList != null) {
DatabaseInterface databaseInterface = meta.getDatabaseInterface();
if (databaseInterface instanceof GenericDatabaseMeta) {
((GenericDatabaseMeta) databaseInterface).setDatabaseDialect(databaseDialectList.getValue());
}
}
// Streaming result cursor:
if (resultStreamingCursorCheck != null) {
meta.setStreamingResults(resultStreamingCursorCheck.isChecked());
}
// Data tablespace:
if (dataTablespaceBox != null) {
meta.setDataTablespace(dataTablespaceBox.getValue());
}
// Index tablespace
if (indexTablespaceBox != null) {
meta.setIndexTablespace(indexTablespaceBox.getValue());
}
if (serverInstanceBox != null) {
meta.setSQLServerInstance(serverInstanceBox.getValue());
if (optionsParameterTree != null && optionsParameterTree.getRootChildren() != null) {
for (int i = 0; i < optionsParameterTree.getRootChildren().getItemCount(); i++) {
XulTreeItem potRow = optionsParameterTree.getRootChildren().getItem(i);
if (potRow != null && potRow.getRow() != null) {
XulTreeCell cell = potRow.getRow().getCell(0);
XulTreeCell cell2 = potRow.getRow().getCell(1);
if (cell != null && cell.getLabel() != null && cell.getLabel().equals("instance")) {
cell2.setLabel(serverInstanceBox.getValue());
if (serverInstanceBox.getValue().trim().length() == 0) {
cell.setLabel("");
}
}
}
}
}
}
// SQL Server double decimal separator
if (doubleDecimalSeparatorCheck != null) {
meta.setUsingDoubleDecimalAsSchemaTableSeparator(doubleDecimalSeparatorCheck.isChecked());
}
// SAP Attributes...
if (languageBox != null) {
meta.getAttributes().put("SAPLanguage", languageBox.getValue());
}
if (systemNumberBox != null) {
meta.getAttributes().put("SAPSystemNumber", systemNumberBox.getValue());
}
if (clientBox != null) {
meta.getAttributes().put("SAPClient", clientBox.getValue());
}
// Generic settings...
if (customUrlBox != null) {
meta.getAttributes().put(GenericDatabaseMeta.ATRRIBUTE_CUSTOM_URL, customUrlBox.getValue());
}
if (customDriverClassBox != null) {
meta.getAttributes().put(GenericDatabaseMeta.ATRRIBUTE_CUSTOM_DRIVER_CLASS, customDriverClassBox.getValue());
}
// Server Name: (Informix)
if (serverNameBox != null) {
meta.setServername(serverNameBox.getValue());
}
// Microsoft SQL Server Use Integrated Security
if (useIntegratedSecurityCheck != null) {
Boolean useIntegratedSecurity = useIntegratedSecurityCheck.isChecked();
meta.getAttributes().put(MSSQLServerNativeDatabaseMeta.ATTRIBUTE_USE_INTEGRATED_SECURITY, useIntegratedSecurity != null ? useIntegratedSecurity.toString() : "false");
}
if (webAppName != null) {
meta.setDBName(webAppName.getValue());
}
}
use of org.pentaho.ui.xul.components.XulTreeCell in project data-access by pentaho.
the class StageDataStep method deselectAll.
@Bindable
public void deselectAll() {
// $NON-NLS-1$
XulTree tree = (XulTree) document.getElementById("csvModelDataTable");
for (XulComponent component : tree.getRootChildren().getChildNodes()) {
XulTreeItem item = (XulTreeItem) component;
for (XulComponent childComp : item.getChildNodes()) {
XulTreeRow row = (XulTreeRow) childComp;
XulTreeCell cell = row.getCell(0);
cell.setValue(false);
}
}
datasourceModel.getModelInfo().validate();
}
use of org.pentaho.ui.xul.components.XulTreeCell in project data-access by pentaho.
the class StageDataStep method selectAll.
@Bindable
public void selectAll() {
// $NON-NLS-1$
XulTree tree = (XulTree) document.getElementById("csvModelDataTable");
for (XulComponent component : tree.getRootChildren().getChildNodes()) {
XulTreeItem item = (XulTreeItem) component;
for (XulComponent childComp : item.getChildNodes()) {
XulTreeRow row = (XulTreeRow) childComp;
XulTreeCell cell = row.getCell(0);
cell.setValue(true);
}
}
datasourceModel.getModelInfo().validate();
}
Aggregations