Thursday, June 17, 2010

Using Applet in OAF

I have came across the use of applet within OAF page for a requirement where I had to use Java APIs provided by an activeX control loaded on client machine. Since OAF code runs on server side and not on client machine, using the applet was the only option to use.

The steps for using the applet are

  • Suppose XXApplet.class is the class file of your applet. First step is to package the applet into a jar file and sign the jar file. A page allow only singed applets to run, hence signing the applet is required.
  • To convert an applet class to a jar, command is

jar cvf uXXApplet.jar XXApplet.class

  • To sign the above jar file, follow below two links in chronological order by logging into unix server

http://java.sun.com/docs/books/tutorial/security/toolfilex/step2.html

http://java.sun.com/docs/books/tutorial/security/toolfilex/step3.html

  • On your OAF page, create OARawTextBean item. Lets assume its ID is xxApplet.
  • Extend the controller of the page. In your process request, you can attach the html text to the above Raw Text Bean as below. The example also shows passing the parameters to applet as "DocumentName" and "DocumentId".

String appletCode = "{applet code='XXApplet.class' ARCHIVE='XXApplet.jar' width=550 height=75}" + "{PARAM NAME='DocumentName' VALUE='XXXXXXX'}" + "{PARAM NAME='DocumentId' VALUE='A5577'}" +"This browser does not support Applets.{/applet}"; // replace } with > and { with <

OARawTextBean appletBean = (OARawTextBean)webBean.findChildRecursive("xxApplet"); !

appletBean.setText(appletCode);

  • Put the signed Applet jar file at $OA_HTML.


9 comments:

lakshmi said...

Hi gowrishankar,

I have submit button in a oaf page which invokes the applet.I have one issue in this page .here i have 2 pages first oaf page and 2nd page is applet. first navigating from oaf to applet working properly.but when navigating from applet page to oaf page by clicking on back button in applet navigating to oaf search page.but after this when i navigate to applet this time iam not geting some tool tips and some options. can u please do needful.
is this sum thing with seesion values

oraclefusion said...

Thanks for sharing for the further information about the oracle visit
Oracle Fusion Financials Training

gowsalya said...

Outstanding blog post, I have marked your site so ideally I’ll see much more on this subject in the foreseeable future.
python training in chennai
python course institute in chennai

priya said...

Awesome article. It is so detailed and well formatted that i enjoyed reading it as well as get some new information too.
Data Science Training in Indira nagar
Data Science Training in btm layout
Data Science Training in Kalyan nagar
Data Science training in Indira nagar
Data Science Training in Marathahalli

nisha said...

The Blog is really very Impressive.every content should be very neatly represented. concepts are easily able to understand.

Data Science Training Course In Chennai | Data Science Training Course In Anna Nagar | Data Science Training Course In OMR | Data Science Training Course In Porur | Data Science Training Course In Tambaram | Data Science Training Course In Velachery

deiva said...

Awesome article. It is so detailed and well formatted that i enjoyed reading it as well as get some new information too.
java training in chennai

java training in omr

aws training in chennai

aws training in omr

python training in chennai

python training in omr

selenium training in chennai

selenium training in omr


vicky said...

Thanks for one marvelous posting! I enjoyed reading it; you are a great author.
I will make sure to bookmark your blog and may come back someday. I want to encourage that you continue your great post
data science training in chennai

data science training in tambaram

android training in chennai

android training in tambaram

devops training in chennai

devops training in tambaram

artificial intelligence training in chennai

artificial intelligence training in tambaram

Realtime Experts said...

Well explanation with great coding knowledge. This blog gonna helpful to many. I am expecting these kind blogs in future too.
Oracle Apps Technical Training in Bangalore

fusionscmtraininginhyderabad said...

The keyword serves as a guiding beacon for individuals actively seeking Fusion Procurement Training resources specific to Oracle Fusion HCM. It indicates that while the blog provides valuable insights into using Applets in OAF, there is a broader educational landscape available for those aspiring to achieve proficiency in Oracle's advanced Human Capital Management through specialized online training.