We are running an application over oracle forms 11 g .
we are planning to set up 2 web url links in the same web server for different languages. We are looking forward to set up an variable at the web config file or environment config file. And during runtime check the values of this variable and display forms data to the used in the forms. Can you please help me on setting up this variable and how to get this value during runtime? thanks for your valuable time.
You could setup 2 different configurations in the formsweb.cfg. You would have a default.env ( or whatever name you wanted to give ) for each one. When you launch from the web url link, you would define your configuration name ( config=LANG1, config=LANG2 ). Within forms, you can then use get_application_property( CONFIG ) to return to you which language you were in.
Related
I use now persistenceMapperWEBAPIClient1 as PersistentMapper with default Uri http://localhost:5000/api/A0_WebApi and default User: a/Password: 123456
While prototyping on Local Server I have saved some data for the same(default) user.
Now I start my application with persistenceMapperWEBAPIClient1 as PersistentMapper, but I get no data. So it seems I access quite different data from prototype and from my application. Is it a thing of prefix perhaps? But I use the same user in both cases
/Efim
That is the answer of Hans:
The turnkey application can either go in prototype mode - then it saves to a xml file named as the model - controlled by App_Data/MDrivenServerOverride.xml
...or it can connect to an MDriverServer in one of two ways:
MDrivenServer is found relative to TurnkeyApp ./__MDrivenServer and user and pwd taken from App_Data/TurnkeySettings.xml
MDrivenServer is found from setting in App_Data/MDrivenServerOverride.xml :
http://localhost:5010/
https://wiki.mdriven.net/index.php/MDrivenServerOverride
/Hans
In the base templates of the Keycloak there are multiple examples of variables, that are accessed in the Freemarker Templates. For example, in the file:
https://github.com/keycloak/keycloak/blob/master/themes/src/main/resources/theme/base/login/login.ftl
There are fields:
properties.kcFormGroupClass
realm.rememberMe
url.registrationUrl
Where are those hashes defined? The only thing I found in the documentation was that I can access:
${some.system.property} - for system properties
${env.ENV_VAR} - for environment variables
but I cannot find f.e. url options. I would like to display the address that the user tries to access.
All this entities is as instances of Java Classes that was provided for Freemarker template engine during page rendering. You can search for corresponding classes in keycloak github repo. Usually they all named like %Something%Bean e.g. LoginBean, ClientBean, UrlBean.
look here:
https://github.com/keycloak/keycloak/blob/10.0.1/services/src/main/java/org/keycloak/forms/login/freemarker/model/RealmBean.java
Following my upgrade from OrientDB 2.1.16 to 2.2.0 I have started to get the following messages during the initialisation:
2016-05-19 09:28:38:690 SEVER ODefaultServerSecurity.loadConfig() Could not access the security JSON file: /config/security.json [ODefaultServerSecurity]
2016-05-19 09:28:39:142 SEVER ODefaultServerSecurity.onAfterActivate() Configuration document is empty [ODefaultServerSecurity]
The database launched but I don't like the warnings. I've looked through the docs but I cant find anything specifically pertaining to this. There are some links on Google that lead to dead Github pages.
First of all I need to get hold of either a copy of the security.json it is expecting (or the docs explaining the expected structure).
Secondly I need to know how and where to set it.
There are 3 ways to specify the location and name of the security.json file used by the new OrientDB security module.
1) Specify the environment variable, ORIENTDB_HOME, and it will look for it here:
"${ORIENTDB_HOME}/config/security.json"
2) Set this property in the orientdb-server-config.xml file: "server.security.file"
3) Pass the location by setting the global variable -Dserver.security.file on startup.
Here's the documentation on the new features + a link to the configuration format.
https://github.com/orientechnologies/orientdb-docs/blob/master/Security-OrientDB-New-Security-Features.md
-Colin
OrientDB LTD
The Company behind OrientDB
I'm developing a simple bpel process that takes data from an external file (txt or xml).
In detail, i'm trying to develop a process that takes in input 2 strings (user and pass) and checks if they are in my "Account" file. If so, output return 'true', if not 'false'.
I'm using eclipse and i can't find anything that could help me. I read something about 'file adapter', but, in eclipse, palette view doesn't show this option. Any idea ?
There are two possibilities:
If your BPEL engine supports XPath 2.0, you can use the doc() function to load an XML document and look for certain entries.
doc("users.xml")/users/user[#id = $uid and #password = $password]
should return the user node where id and password attributes match the values stored in the BPEL variables $id and $password. You can place that expression in an if activity.
If your engine does not support XPath 2.0 and you need to stick to standard BPEL, you should write a simple Web service that performs the lookup. Use an invoke activity to call this Web service.
Being fairly new to Zend Framework, I've been reading and trying out various tutorials on the web and books I've purchased. One thing all the tutorials do is hard code certain values into into the bootstrap or other code. For example, setting the title:
$this->_view->headTitle('MySite');
I realize this can be set in the application.ini file, but I don't think that is appropriate either if you are distributing the application to other sites.
I would be interested in hearing ideas where application specific settings are set in the application.ini file and loaded:
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH.'/configs/application.ini'
);
Then somewhere in the bootstrap, checking for a config.ini file and adding these to currently existing application config array, and if config.ini does not exist, retrieving such site specific configs from a database and writing the config.ini file (Obviously the file deleted and rewritten if a value is changed in the database).
I don't need to see how the file is written or what not... just a general idea of how others are handling such things. Or provide different ideas of doing this?
I would rather end up using something like this when setting various site specific configurations:
$this->_view->headTitle($config->site->title);
Hope this makes sense :-)
It depends a bit what kind of data you want in your config files, and how you are reusing your application on different sites.
Although it's normal to pass the filename to your config file as the second parameter to Zend_Application, you can also pass a Zend_Config object. Zend_Config itself makes it very easy to merge together multiple config files, so in your public/index.php you could do something like this:
$defaultConfigFilename = APPLICATION_PATH . '/configs/application.ini';
$siteConfigFilename = APPLICATION_PATH . '/configs/site.ini';
// Create config object, using site-specific data if available
$config = new Zend_Config_Ini($defaultConfigFilename, null, true);
if (file_exists($siteConfigFilename)) {
$siteConfig = new Zend_Config_Ini($siteConfigFilename);
$config->merge($siteConfig)
->setReadOnly();
}
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
$config
);
this will look for a site.ini file, and if it exists, merge it with the application ini. Then it will bootstrap the application as normal.
Another way that I've used myself recently is to just keep application.ini as minimal as possible (e.g. only bootstrap class name and location), and then have an _initSite() method in my bootstrap class that creates a Site object using data from the database. It then reads in config data from a ini file, and stores this in the Site object. I then have a site resource that I can access elsewhere in my application, for example to do $view->_headTitle($site->config->title); like in your example above.
I hope this gives you some ideas. ZF is pretty flexible!
Remember, that you may pass many config files to Zend_Application, not just application.ini,
so this might be the best in your case.
If you heavily rely on configs, you may be interested on creating additional application resources, using specific setting you provide to the Zend_Application via config.ini.
But I bet, it the future, you will store these options in the database and allow end user to modify them.
In the simplest case, solution I prefer:
// in the layout.phtml
$this->render('head.phtml');
...
$this->render('footer.phtml');
And in the footer and head configuration specific to the site.
Fast and easy to maintain.
in view_script.phtml
$this->headTitle()->prepend($config->site_title);
where the trouble is?