DataSource e getBean in Configure Bean Shell Form Binder

Confluence User - 21 Apr, 2022

Hi everyone,

I'm new to Joget 7. I configured my Profile in DataSrouce & Profile Setting, I called this profile "myConn".

Inside an object, a select box, I am creating a Configure Bean Shell Form Binder. I am trying to load the connection by following the instructions on the page:
https://dev.joget.org/community/display/DX7/Bean+Shell+Programming+Guide#BeanShellProgrammingGuide-UseasFormLoadBinderFormLoadBinder

I don't understand what you need to put in the function Bean:
// retrieve connection from the default datasource
DataSource ds = (DataSource) AppUtil.getApplicationContext (). GetBean ("setupDataSource");

Should I change "setupDataSource" to my "myConn" profile?

What if I create a new profile? how do i manage it dynamically?


Thanks

beanshell

2


22 Apr, 2022
confluenceUser
1
confluenceUser

Hi, there is only 1 datasource profile active at a time, so that line of code will retrieve the current active datasource.

22 Apr, 2022
confluenceUser
confluenceUser

Ok  Many Thanks

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print