...
Uncomment the following line.
Code Block |
---|
/*if(searchParams.getSearchConditions().get(0).getSearchField().getFieldValue()=="" || searchParams.getSearchConditions().get(0).getSearchField().getFieldValue()==null){ GlobalVariables.getMessageMap().putError(KRADConstants.GLOBAL_ERRORS, OLEConstants.DESCRIBE_ENTER_SEARCH_TEXT); importBibForm.setBibMarcRecordList(null); importBibForm.setBibUuidsList(null); importBibForm.setImportBibSearch(null); searchParams.getSearchResultFields().clear(); return getUIFModelAndView(importBibForm); }*//List<String> results = externalDataSource.searchForBibs(searchParams,dataSourceConfig); |
File ImportBibSearchPage.xml
Uncomment the commented line in the following snippet.
Code Block |
---|
<bean id="search_button" parent="Uif-SecondaryActionButton-Small" /* DataSourceConfig dataSourceConfig = new DataSourceConfig(); BusinessObjectService businessObjectService = KRADServiceLocator.getBusinessObjectService(); Map parentCriteria = new HashMap(); parentCriteria.put("id", source); ExternalDataSourceConfig externalDataSourceConfig = new ExternalDataSourceConfig(); externalDataSourceConfig = businessObjectService.findByPrimaryKey(ExternalDataSourceConfig.class, parentCriteria); dataSourceConfig.setDomainName(externalDataSourceConfig.getDomainName()); dataSourceConfig.setPortNum(externalDataSourceConfig.getPortNum()); dataSourceConfig.setDatabaseName(externalDataSourceConfig.getDatabaseName()); dataSourceConfig.setLoginId(externalDataSourceConfig.getLoginId()); dataSourceConfig.setPassword(externalDataSourceConfig.getPassword()); dataSourceConfig.setAuthKey(externalDataSourceConfig.getAuthKey()); //String databaseName = externalDataSourceConfig.getDatabaseName(); String loginIdDbName = externalDataSourceConfig.getLoginId(); if(loginIdDbName!=null && loginIdDbName.equalsIgnoreCase("")) { GlobalVariables.getMessageMap().putError(KRADConstants.GLOBAL_ERRORS,OLEConstants.DATA_BASE_NOT_VALID); importBibForm.setImportBibSearch(null); return getUIFModelAndView(importBibForm); } String[] parts = loginIdDbName.split("/"); String logInId = parts[0]; String dataBase p:methodToCall="search" p:actionLabel="Search"/>= parts[1]; List<String> dataBaseList = new ArrayList<String>(); dataBaseList.add(dataBase); <!--p:methodToCall="search" p:actionLabel="Search" p:refreshId="ExternalSourceResults-Section"/>--> if(dataBaseList!=null && dataBaseList.get(0).equalsIgnoreCase("")) { GlobalVariables.getMessageMap().putError(KRADConstants.GLOBAL_ERRORS,OLEConstants.DATA_BASE_NOT_VALID); return getUIFModelAndView(importBibForm); } ExternalDataSource externalDataSource = ExternalDataSourceFactory.getInstance().getExternalDataSource(dataSourceConfig); results = externalDataSource.searchForBibs(searchParams,dataSourceConfig); */ /* GlobalVariables.getMessageMap().putError(KRADConstants.GLOBAL_ERRORS, OLEConstants.DATA_BASE_NOT_SELECTED); importBibForm.setImportBibSearch(null); return getUIFModelAndView(importBibForm);*/ |
File ImportBibSearchPage.xml
Uncomment the commented line in the following snippet.
Code Block |
---|
<!--<ref bean="ExternalSourceSearch-Buttons"/>--> <!--<ref bean="ExternalSourceResults-Section"/>--> <!--<ref bean="externalNext-Button"/>--> |
...