Forms 11g javascript integration: Call others

Forms 11g holds a lot of interesting new features focused on event-driven architecture, one of these is javascript integration. There are two ways of using javascript with Forms 11g: “call others” and “let others call you”.

Javascript can call code in Forms(“Let others call you”) using the new forms trigger “when-custom-javacript-event”.

This post is going to show you the first one: “call others”, in other words call javascript from your Oracle Forms application.

During the Forms Modernization Seminar I showed a google map that could be manipulated from an Oracle Form. It’s an easy implementation with only a few lines of code(most of the javascript is taken from the api examples on the google code site: http://code.google.com/apis/maps/).

  • Build a little form with one (control) block, one text field(to enter an address) and one button(to call the javascript code).
  • Next step is to create an HTML-page to display the form.

This code puts the form(in an iframe) and the map side by side:
(Click to enlarge)

And it will look like this:

  • The javascript that will be called is put in another file google.js:

  • The only thing to do is creating a “when-button-pressed” trigger in forms to call the javascript function showAddress.
    This is done by a new built-in procedure web.javascript_eval_expr:
  • Copy the HTML and javascript file to the following directory:
    <middleware_home>\user_projects\domains\<domain>\servers\WLS_FORMS\tmp\_WL_user\formsapp_11.1.1\e18uoi\war\
  • Create a new configuration using Enterprise Manager:

  • Make sure the parameter EnableJavascriptEvent is set to “true’ in your configuration!

And the working demo…

SYSMAN Account is Locked

This morning I opened Enterprise Manager and instead of the regular “login”-screen, I found following screen:

 

Everything is up and running but Enterprise Manager is not able to connect to the database instance. Sounds like a connection problem, not?

These are the steps I followed to solve this issue and to reset the “sysman”-account:

STEP1: Check EM log file:

[oracle@myserver log]$ pwd


/opt/oracle/product/11.1.0/db/myserver.mydomain_DWHD
/sysman/log

 [oracle@ myserver log]$ tail -50 emoms.log

2008-02-11 23:12:04,968 [ApplicationServerThread-11]
ERROR app.SessionObjectManager sessionDestroyed.128 -
java.sql.SQLException: ORA-28000: the account is locked

java.sql.SQLException: ORA-28000: the account is locked

STEP 2: Check database users:

SYSTEM> select username, account_status from dba_users;
USERNAME ACCOUNT_STATUS
------------------------------ -------------
MGMT_VIEW OPEN
SYS OPEN
SYSTEM OPEN
DBSNMP OPEN
SYSMAN LOCKED(TIMED)

 

STEP 3: Stop the Database Console

[oracle@myserver dbascripts]$ emctl stop dbconsole

Oracle Enterprise Manager 11g Database Control Release 11.1.0.6.0

Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.

https://myserver.mydomain:1158/em/console/aboutApplication

Stopping Oracle Enterprise Manager 11g Database Control ...

 ...  Stopped.

[oracle@myserver dbascripts]$

STEP 4: Reset the SYSMAN-account


[oracle@myserver log]$ sqlplus "/ as sysdba"
SQL*Plus: Release 11.1.0.6.0 - Production on Tue Feb 12 09:51:59 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SYS> alter user sysman identified by <new_password> account unlock;
User altered.

STEP 5: Reset the SYSMAN-account in the “targets.xml”-file ($ORACLE_HOME/myserver.mydomain _mySID/sysman/emd) and modify the “Username”-Property and the “Password”-property as follows:

[oracle@myserver emd]$ pwd
/opt/oracle/product/11.1.0/db/myserver.mydomain_DWHD/sysman/emd
[oracle@myserver emd]$ cp targets.xml targets.xml.ori
[oracle@myserver emd]$ vi targets.xml

<Property NAME="UserName" VALUE="SYSMAN" ENCRYPTED="FALSE"/>
<Property NAME="password" VALUE="<new_password>" ENCRYPTED="FALSE"/>

STEP 6: Reset the SYSMAN-account in the “emoms.properties”-file ($ORACLE_HOME/myserver.my_domain_mySID/sysman.config) and modify the “oracle.sysman.eml.mntr.emdRepPwd”-parameter and the “oracle.sysman.eml.mntr.emdRepPwdEncrypted” in the following way:

[oracle@myserver config]$ pwd
/opt/oracle/product/11.1.0/db/myserver.mydomain_DWHD/sysman/config
[oracle@myserver config]$ cp emoms.properties emoms.properties.ori
[oracle@myserver config]$ vi emoms.properties

oracle.sysman.eml.mntr.emdRepPwd=<new_password>

oracle.sysman.eml.mntr.emdRepPwdEncrypted=FALSE

STEP 7: Start the Database Console

[oracle@myserver dbascripts]$ emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.1.0.6.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://myserver.mydomain:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ...... started.
------------------------------------------------------------------
Logs are generated in directory
/opt/oracle/product/11.1.0/db/myserver.mydomain_DWHD/sysman/log

 

STEP 8: Test

Oracle Open World – Keynote Charles Phillips

This morning a Keynote was given by Charles Phillips, President of Oracle Corporation. In this keynote Charles Phillips gave us an insight on the vision of Oracle and the strategy in marketting this vision throughout it’s customers, partners and of course software offering.

Each Challenge was tackled by the different Oracle Offerings there are today.

CEO Challenge:
The CEO of a company needs to integrate different kinds of applications and once in the boardroom he needs to be able to point all noses in the same direction, the direction of ROI.

This Integration-challenge can be tackled by the new Application Integration Architecture offering of Oracle. Through a demo we saw how this challenge was tackled using Webcenter dashboard as a centralized view-point, JDeveloper as the integrated Development Environment and BPA which was used for the full round-tripping of business analysis and development.

Using this Oracle Technology offering, the AIA, the CEO can integrate his existing Siebel, SAP, Financials or CRM applications in a unified, uniform and more-over standardized way.

CFO Challenge:
The Chief Financial Officer has other concerns such as governance and risk management to keep in mind throughout the different processes in his/her company. How can Oracle offer a solution to this common problem, faced within every company that has a diversity of policies and rules to adhere to.

The Oracle Governance & Risk Competence Manager:
Through this manager the CFO has a one-stop view to control the different policies which are defined throughout the organisation. If a certain rule is being violated, the Manager will show up a red light and in 1 step the CFO can change/adapt the policy rules so the company’s back on track.
This manager uses a centralized content repository and enforces the policies at runtime using the Active Apps Policies Suite.


Another Security-stack being offerd by Oracle entails the Database Vault and Audit Vault to secure as well data as audit data in an Integrated Security Stack.


Engineering & Manufacturing Manager:
The engineering and manufacturing manager has a lot of challenges as well, such as keeping insight on the product stock and having the ability bto manage the entire product lifecycle without any delay.

Oracle offers ‘Oracle Agile PLM’ to tackle all of these requirements, the Oracle Product Lifecycle Management Technology Stack.


In the demo we saw that the manager had a centralized view on all the needed data using Webcenter dashboard and a Shared Content System.
The webcenter dashboard could be hooked up with third-party legacy applications through adapters and uses XML standards based messaging for this purpose.

Operations Challenge, Gaining Actionable Insight:
The operations challenge every administrator, manager is facing today: act when necessary!
If a glitch has occured during a business process lifecycle, a product is out of stock, an order hasn’t been processed correctly, if a given manager hasn’t updated his tasks-lists, in other words when a bottleneck is being introduced inside the company … we need to be able to act!



Through the usage of Enterprise Performance Management Workspace, BI Enterprise Edition and the Action Framework we can act upon these glitches immediatly.

Through the Enterprise Performance Management Workspace, we have a real-time view on the business processes in our company, and act when necessary.

The Action Framework gives us the possibility to interate transactions, historical data and tasks so were able to act correctly given we have all the needed data to provide with an accurate view on our current business.

Through the usage of Packaged BI Applications (Financial Package, Operations Package, CRM Package), the customer can purchase thed package which is measured for his/her company.

How can we manage these heterogenous environments?
Enterprise Manager Services Dashboard gives us the capability of monitoring and administrating the different services which are running inside our business.
The EMSD gives a follow-up on as well the business as the system metrics in our organisation.

Through this EMSD we can enable Real Application Clustering at runtime, without downtime.