From 18374c807fa7af5917e5e45e6d241de6f2290876 Mon Sep 17 00:00:00 2001 From: alan Date: Sun, 29 Sep 2019 17:26:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20DEC-10152=20JNDI=E7=9A=84INTIAL=5FCONTEX?= =?UTF-8?q?T=5FFACTORY=20=E6=94=B9=E4=B8=BA=E4=B8=8B=E6=8B=89=E6=A1=86?= =?UTF-8?q?=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/constants/constant.ts | 9 +++++++++ .../pages/maintain/forms/components/form.jndi.ts | 13 +++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/modules/constants/constant.ts b/src/modules/constants/constant.ts index 8734919..bae692f 100644 --- a/src/modules/constants/constant.ts +++ b/src/modules/constants/constant.ts @@ -681,3 +681,12 @@ export const CONNECTION_LAYOUT = { hgap: 15, vgap: 15, }; + + +export const JNDI_FACTORYS = [ + 'weblogic.jndi.WLInitialContextFactory', + 'com.ibm.websphere.naming.WsnInitialContextFactory', + 'org.jboss.naming.HttpNamingContextFactory', + 'org.jnp.interfaces.NamingContextFactory', + 'com.caucho.burlap.BurlapContextFactory', +]; diff --git a/src/modules/pages/maintain/forms/components/form.jndi.ts b/src/modules/pages/maintain/forms/components/form.jndi.ts index 32dabb4..dea1b49 100644 --- a/src/modules/pages/maintain/forms/components/form.jndi.ts +++ b/src/modules/pages/maintain/forms/components/form.jndi.ts @@ -2,7 +2,7 @@ import { shortcut } from '@core/core'; import { Vertical, TextEditor, Htape, Left, Label, TextValueCombo } from 'ui'; import { FormItemXtype } from '../../components/form_item/form_item'; import { ConnectionJNDI, Connection, ContextHashtable } from 'src/modules/crud/crud.typings'; -import { CONNECT_CHARSET, CONNECTION_LAYOUT } from '@constants/constant'; +import { CONNECT_CHARSET, CONNECTION_LAYOUT, JNDI_FACTORYS } from '@constants/constant'; import { CollapseXtype, EVENT_CHANGE } from 'src/modules/components/collapse/collapse'; import { connectionType } from '@constants/env'; export const FormJndiXtype = 'dec.dcm.maintain.form.jndi'; @@ -98,13 +98,18 @@ export class FormJndi extends BI.Widget { name: 'INTIAL_CONTEXT_FACTORY', nameWidth: 200, forms: [{ - type: TextEditor, + type: TextValueCombo, width: 300, - allowBlank: true, value: contextHashtable['java.naming.factory.initial'], ref: (_ref: any) => { this.form.initial = _ref; }, + items: JNDI_FACTORYS.map(item => { + return { + text: item, + value: item, + }; + }), }], }, { @@ -356,7 +361,7 @@ export class FormJndi extends BI.Widget { public getSubmitValue():Connection { const contextHashtable = { - 'java.naming.factory.initial': this.form.initial.getValue(), + 'java.naming.factory.initial': this.form.initial.getValue()[0], 'java.naming.provider.url': this.form.providerUrl.getValue(), 'java.naming.factory.object': this.form.factoryObject.getValue(), 'java.naming.factory.state': this.form.factoryState.getValue(),