Hello World Program in Mobile Applications
In this article, we will create a Hello World page which gets the name from the user and prints the same with the string “Hello World”
We have to create 3 Java Class for the same. They are
1. CustomTestFunction.java: This Class is for Application level initialization and this class is registered as the Function in AOL. This extends the base class MenuItemBean
2. CustomTestPage.java: This Class is for Page initialization. It just creates the layout and adds the beans to the page. It extends PageBean Class
3. CustomTestFListener.java: This Class is the event listener class. It listens to the events on each bean on the page and calls appropriate method to handle the event.
1) CustomTestFunction.java
/* Function class - this links the page with FND Function in AOL */
package xxx.custom.server;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.inv.utilities.server.UtilFns;
import oracle.apps.mwa.beans.MenuItemBean;
import oracle.apps.mwa.eventmodel.MWAAppListener;
import oracle.apps.mwa.eventmodel.MWAEvent;
public class CustomTestFunction extends MenuItemBean implements MWAAppListener
{
public CustomTestFunction()
{
//Link the page with the function
setFirstPageName("xxx.custom.server.CustomTestPage");
addListener(this);
}
public void appEntered(MWAEvent mwaevent)
{
// Code here to initialize Application Level
// Logging Functions
UtilFns.trace("Application Entered");
}
public void appExited(MWAEvent mwaevent)
{
// Code to be executed when the user exits the application
// Logging Functions
UtilFns.trace("Application Exited");
}
public static final String RCS_ID = "$Header:$";
public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion("$Header:$", "%packageheader%");
}
2. CustomTestPage.java
/* Page Class - Which has the Page Layout. We create and add beans to it */
package xxx.custom.server;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.inv.utilities.server.UtilFns;
import oracle.apps.mwa.beans.ButtonFieldBean;
import oracle.apps.mwa.beans.PageBean;
import oracle.apps.mwa.beans.TextFieldBean;
import oracle.apps.mwa.eventmodel.AbortHandlerException;
import oracle.apps.mwa.eventmodel.DefaultOnlyHandlerException;
import oracle.apps.mwa.eventmodel.InterruptedHandlerException;
import oracle.apps.mwa.eventmodel.MWAEvent;
import xxx.custom.server.CustomTestFListener;
//Page Listener Class
public class CustomTestPage extends PageBean {
/**
* Default constructor which just initialises the layout.
*/
public CustomTestPage() {
//Method to initialize the layout
initLayout();
}
/**
* Does the initialization of all the fields. Creates new instances
* and calls the method to set the prompts which may have to be later
* moved to the page enter event if we were using AK prompts as we
* require the session for the same.
*/
private void initLayout() {
//Logging
if (UtilFns.isTraceOn)
UtilFns.trace("CustomPage initLayout");
//Create a Text Filed and Set an ID
mHelloWorld = new TextFieldBean();
mHelloWorld.setName("TEST.HELLO");
// Create a Submit Button and set an ID
mSubmit = new ButtonFieldBean();
mSubmit.setName("TEST.SUBMIT");
//add the fields
addFieldBean(mHelloWorld);
addFieldBean(mSubmit);
//add field listener to all necessary fields
CustomTestFListener fieldListener =
new CustomTestFListener();
mHelloWorld.addListener(fieldListener);
mSubmit.addListener(fieldListener);
//call this method to initializa the prompts
this.initPrompts();
}
/**
* Method that sets all the prompts up.
*/
private void initPrompts() {
UtilFns.trace(" Custom Page - Init Prompts");
// sets the page title
this.setPrompt("Test Custom Page");
// set the prompts for all the remaining fields
mHelloWorld.setPrompt("Enter Your Name");
mSubmit.setPrompt("Submit");
//please note that we should not hard code page name and prompts
//as it may cause translation problems
//we have an different procedure to overcome this
}
// This method is called when the user clicks the submit button
public void print(MWAEvent mwaevent, TextFieldBean mTextBean) throws AbortHandlerException
{
UtilFns.trace(" Custom Page - print ");
// Get the value from Text bean and append hello world
// and display it to user on the same field
String s = mTextBean.getValue();
mTextBean.setValue(s+" Hello World");
}
// Method to get handle of TextBean
public TextFieldBean getHelloWorld() {
return mHelloWorld;
}
//Method called when the page is entered
public void pageEntered(MWAEvent e) throws AbortHandlerException,
InterruptedHandlerException,
DefaultOnlyHandlerException {
UtilFns.trace(" Custom Page - pageEntered ");
}
//Method called when the page is exited
public void pageExited(MWAEvent e) throws AbortHandlerException,
InterruptedHandlerException,
DefaultOnlyHandlerException {
UtilFns.trace(" Custom Page - pageExited ");
}
// Create the Bean Variables
TextFieldBean mHelloWorld;
protected ButtonFieldBean mSubmit;
}
3) CustomTestFListener.java
/* Listener Class - Handles all events */
package xxx.custom.server;
import oracle.apps.inv.utilities.server.UtilFns;
import oracle.apps.mwa.beans.FieldBean;
import oracle.apps.mwa.container.Session;
import oracle.apps.mwa.eventmodel.AbortHandlerException;
import oracle.apps.mwa.eventmodel.DefaultOnlyHandlerException;
import oracle.apps.mwa.eventmodel.InterruptedHandlerException;
import oracle.apps.mwa.eventmodel.MWAEvent;
import oracle.apps.mwa.eventmodel.MWAFieldListener;
public class CustomTestFListener implements MWAFieldListener {
public CustomTestFListener() {
}
public void fieldEntered(MWAEvent mwaevent) throws AbortHandlerException,InterruptedHandlerException, DefaultOnlyHandlerException {
UtilFns.trace("Inside Field Entered");
ses = mwaevent.getSession();
String s = UtilFns.fieldEnterSource(ses);
// Prints the Current Bean's ID
UtilFns.trace("CustomFListener:fieldEntered:fldName = " + s);
}
public void fieldExited(MWAEvent mwaevent) throws AbortHandlerException, InterruptedHandlerException, DefaultOnlyHandlerException {
String s = ((FieldBean)mwaevent.getSource()).getName();
// Prints the Current Bean's ID
UtilFns.trace("CustomFListener:fieldExited:fldName = " + s);
// Get handle to session and page
Session ses = mwaevent.getSession();
pg = (CustomTestPage)ses.getCurrentPage();
// when the user clicks the Submit button call the method to print
// Hello world with the text entered in text box
if (s.equals("TEST.SUBMIT")) {
pg.print(mwaevent,pg.getHelloWorld());
return;
}
}
// Varibale declaration
CustomTestPage pg;
Session ses;
}
Screen shots:
Fig 1: Choose the Responsibility in the Mobile Device

Fig 2: Choose the Function from main menu
Fig 3: The Hello World Page appears

Fig 4: Enter your name

Fig 5: When you click submit button, Your name is appended with Hello world and displayed in the Text Box

written by brad , March 10, 2008
Great info! I've been looking for just this sort of tutorial for quite some time. I was hoping you could share some environment setup info for the java novice. I'm a pl/sql, forms, and reports programmer with a pretty rudimentary knowledge of java. It would be great if you could walk throught he steps required to create a new package with Jdeveloper that includes all of the referenced classes so we can take your sample .java and compile
Thanks!!!
Brad
written by newlaptopuser , April 12, 2008
Thank you for this and other wonderful articles. I have a small question.
Can I use rf gun with this custom mobile form without adding special code or this textfield will get populated when I read data using rf gun.
Regards, Nathan.
written by Harish , April 17, 2008
I am very much new to Oracle apps and ofcourse to MSCA. How can i create a pop up for displaying an error or success message with a sound suitable to them respectively.Is there any standard package for sound.
written by Harish , April 17, 2008
Thanks for your reply. But, the requirement that has been passed on to me is to, create a pop up message with a sound. Cant this be done atall???
written by Harish , April 17, 2008
Once again thanks for your information.Can you let me know how to enable the beep sound while displaying a message at the bottom of the screen.
And..Is there only beep sound that can be made..cant we provide a sound which indicates it is an error.
Regards,
Harish.
written by Harish , April 18, 2008
Thanks a lot ...This is very usefull.
written by Harish , April 18, 2008
written by Himanshu Joshi , April 21, 2008
Please Provide patch 4205328 for MWA Setup, Testing, Error Logging and Debugging
Regards
Himanshu Joshi
written by nisha , April 21, 2008
In designing a new page,we saw 3 java class files created for the Purpose.Please let us know how to proceed further like precisely where it has to be place and what needs to compiled ?
Apologies if we are asking very fundamental questions!
Rgds
written by nisha , April 21, 2008
Adding to my earlier doubts, can you kindly let me know if we need to write additional code to the source code in java and then recompile it to create our own page. If so how can i get this source code.
Regards
Nisha
written by nisha , April 22, 2008
Please respond to our earlier queries as we are struck with the way forward!
written by Ritesh M , April 22, 2008
I really liked your way to display the dialog message..... don't you think that we can achieve the same via creating another custom msca page for confirmation....rather than opening another telnet session.
any thoughts ?
Regards,
Ritesh
written by Ritesh M , April 22, 2008
Please follow the steps given below :
1) Copy all 3 Java Files to $CUST_TOP/java using any FTP tool
2) Set environment (if required)
3) Compile the java files using javac file.java
4) Register it ...
written by nisha , April 23, 2008
We have a multirecord in the screen say typically Lot Id's,we scan Lot Id then the cursor should be in next record where a new lot will be captured.moving to next record precisely!How do we acheive this?
written by Ritesh M , April 24, 2008
Is this the standard form or its an custom form ?
written by nisha , April 25, 2008
Its a custom form!
written by Ritesh M , April 25, 2008
SpecialKeyPressed – this is called when the user presses any special character, such as a Control character. Pressing CTRL-G to generate LPNs or Lots is one example of when this gets called
written by Ritesh M , April 25, 2008
written by nisha , April 25, 2008
Is there any way we can have two text fields residing sidy by side in the UI as given below
______________________ _________________________
| | | |
|_____________________| |_______________________ |
written by nisha , April 25, 2008
written by Anil Passi- , April 26, 2008
Thanks for your help to everyone here on this specialised subject matter.
Thanks
Anil Passi
written by Ritesh M , April 26, 2008
thanks for your reply.....
but i think by using ListFieldBean we can't acheive MultiRecord scenario....i agree we can change the values of other fields based on the value selected from ListFieldBean......
and regarding multirecord.....by using NEXT button ....r we saving the records one by one or putting them into array...? just curious to know about the background ..... can u pls provide me any standard form which behaves the same way...
Thanks,
Ritesh
written by nisha , April 28, 2008
Thanks for your updates . We have the following requirement.
We are creating some custom screens (Multi record screen). This screen needs to scan a series of lot ids and some other corresponding values. So our screen needs to have a lot id and another corresponding field side by side. So far I have seen only text field one below another (Single record screen).
Is there any way by which we can have all the related text fields in a single line.
The screen should be similar to grid layout which has 2 columns per row.
Thanks,
Nisha
written by Harish , April 30, 2008
I was able to get negative beep and the popup window but, the problem was..The beep sound is coming only when i select OK button in the Popup window... Can u help me in this..
if(errFlg.equals("E"))
{
PresentationManager presentationmanager = ((TelnetSession)session).getPresentationManager();
ProtocolHandler protocolhandler = presentationmanager.getProtocolHandler();
protocolhandler.willSendNegativeSound();
session.setStatusMessage(errMsg);
String dialogPageButtons[] = {"Ok"};
TelnetSession telnetsession1 = (TelnetSession)session;
int k = telnetsession1.showPromptPage("Error",errMsg,dialogPageButtons);
session.setNextFieldName(pg.getLotSublot().getName());
}
Regards,
Harish
written by Harish , April 30, 2008
Splitting up the code will be difficult..cos am returning values from procedure. Based on which am passin the error messages....
I got an vauge idea..to do this..dono if it is correct....
can we check if calling beep is success and Then call the popup window??
regards,
Harish
written by Harish , April 30, 2008
If i spilt the code in this way..I can hear only the beep...And...
If i use it as nested IF..{} Then the result is same as popup first and Beep next on OK button...
Regards,
Harish
written by Harish , May 02, 2008
Is the beep misfiring bcos of the popup..which is opening a new session???
Regards,
Harish.
written by Harish , May 05, 2008
This code is wriiten in the listener for the field Truck....
public int validateTrip(MWAEvent mwaevent)
throws AbortHandlerException
{
Session session = mwaevent.getSession();
Session session1 = mwaevent.getSession();
pg = (Page1)session.getCurrentPage();
Connection connection = session.getConnection();
CallableStatement callablestatement;
try
{
String orgid = (String)session.getValue("ORGID");
callablestatement = connection.prepareCall("{call MSCA.VERIFY_TRIP(?,?,?,?,?)}");
callablestatement.registerOutParameter(1, Types.VARCHAR);
callablestatement.registerOutParameter(2, Types.VARCHAR);
callablestatement.registerOutParameter(3, Types.INTEGER);
callablestatement.registerOutParameter(4, Types.VARCHAR);
callablestatement.setString(5, truck);
callablestatement.execute();
String errMsg = callablestatement.getString(1);
String errFlg = callablestatement.getString(2);
int outVal = callablestatement.getInt(3);
String trip = callablestatement.getString(4);
if ( outVal == 1 )
{
pg.getTrip().setValue(trip);
}
if(errFlg.equals("E"))
{
PresentationManager presentationmanager = ((TelnetSession)session).getPresentationManager();
ProtocolHandler protocolhandler = presentationmanager.getProtocolHandler();
protocolhandler.willSendNegativeSound();
String dialogPageButtons[] = {"Ok"};
TelnetSession telnetsession1 = (TelnetSession)session1;
int k = telnetsession1.showPromptPage("Error",errMsg,dialogPageButtons);
session.setStatusMessage(errMsg);
session.setNextFieldName(pg.getTrip().getName());
}
return outVal;
}
written by Harish , May 05, 2008
The user scans/Enters the truck name...Validation for the truck is done using the called procedure...Based on the return value from the procedure the message is displayed..Hope this is clear..
Regards,
Harish.
written by Harish , May 06, 2008
I tired with this boolean variable earlier and it didnt work the way we wished....
If i dont have the Popup message and jus the status message, the beep is coming at the right time..
Cant really find why its firing when i click explicitly on OK button.
Is opening a new session has priority more than the negative beep??
Regards,
Harish.
written by Harish , May 06, 2008
Guess found the solution for this..Instead of using protocolhandler.willSendNegativeSound(); .....
I used..protocolhandler.sendNegativeSound(); ..
Now this is working fine..first the beep triggers and then the Popup...
Thanks a lot for spending your time in this..
Really your inforamtions helped me out...
Regards,
Harish.
written by Himanshu Joshi , May 06, 2008
I am very new to MSCA framework.
I am getting an error while populating LOV.On the first hit, I am getting the error below:
(Thread-13) MWA_LOV_ROW_CONS_FAIL: Unsuccessful row construction
java.lang.NullPointerException
at oracle.apps.mwa.container.LOVRuntimePageHandler.pageEntered(LOVRuntimePageHandler.java:89)
at oracle.apps.mwa.container.StateMachine.callListeners(StateMachine.java:1666)
at oracle.apps.mwa.container.StateMachine.handleEvent(StateMachine.java:1067)
at oracle.apps.mwa.presentation.telnet.PresentationManager.handle(PresentationManager.java:702)
at oracle.apps.mwa.presentation.telnet.ProtocolHandler.run(ProtocolHandler.java:820)
But when I go to next LOV and traverse back to first one, It gives me the LOV.
Please help me in resolving the issue.
written by nisha , May 06, 2008
Is there any way by which we can add a vertical scroll bar to the custom page? For example, if my page contains more than 15
textfields one below the another, we need a scroll bar to go to either the first field or the last. But I have come across the
scroll bars only in case of LOV displays and menu page.
Thanks & Regards,
Nisha
written by Ritesh M , May 08, 2008
From the error its seems that you LOV is having some of the input parameters and the very first time when you navigated to the LOV ....value of one of the input parameter was not initialized and second time it got initialized.....
Suggest you to check the values for input parameters..
Regards,
Ritesh
written by Harish , May 13, 2008
How do i get the trace file for the MSCA application...Need to some performamce tuning to be done...
I have used..FileLogger.getSystemLogger().trace("');
But dono the path for getting the complete trace file..
Can you please help me out...
Regards,
Harish
written by Harish , June 03, 2008
Is ther any way adjusting the size of the popup message windows..i.e the new telnet session window.??
Or Can i make the cursor to starting position of the error message beeing displayed....
In the mobile device, the scanner, the popup error messages run for a second and the display goes to the right bottom end of the screen.These popups work well in the computer and there is no problem like this.
Regards,
Harish.
written by Harish , June 03, 2008
Can't we adjust the size of the new telnet session using TelnetSession.initializeSession().
And what is this CrEme v.4.2..should this be installed on the scanner?
Regards,
Harish.
written by Harish , June 03, 2008
I tried the initializeSession method and it was erroring out for me. Might bcos i don't know how to call that or the values to passed to the method are wrong.
For a popup message we use a new telnet session to display the message. Can we set the window size for this popup and can we bring the cursor to the starting position of the window.
Is ther anyway to add a textfield to the same popup window.
Regarding.. jvm CrEme v.4.2..I didn't understand about this.
Regards,
Harish.
written by Abdul Rasheed , November 11, 2008
I am new this forum and basically i m distribution consultant as of now i was assigned MSCA project.
I have gone through user guide which is provided by oracle, then i was looked out this website. It really gives spoon feeding to begineer.
Can you tell me what is the basic hardware needs for implementing MSCA.
Thanks in advance
M.Abdul
written by Tron , November 19, 2008
written by Tron , November 20, 2008
Agreed with the others. This is an extremely useful document. Thank you for putting it together. If only Oracle was this useful
written by Tron , November 20, 2008
Sorry, one more question. I registered the CustomTestFunction and I can see it in my menu, however I can't get it to do anything when I click on it. Any suggestions where I should start troubleshooting? I attached the JAR with my classes to jserv.properties on the server and restarted apache. Do I need to restart the listener as well?
written by Tron , November 20, 2008
written by Kaukab , January 12, 2009
please let me know its urgent
written by Kaukab , January 13, 2009
I want to add 2 more feilds in a particular page can u suggest the procedure for that. the documentation I have are not very clear.
written by Kaukab , January 14, 2009
Do we need to change in fnd function screen the web_html name or it needs to be registered some where else.
written by Anju , February 10, 2009
Can we use showPromptPage() for prompting a input number field other than dialog box?
Thanks,
Anju
written by Anju , February 11, 2009
We have a requirement to print the label on press of F2.
If the user selects Yes, then he would be prompted for the number of prints. The message would be
No of Prints:
We have done the code changes in the following way
TelnetSession telnetsession1 = (TelnetSession)session;
int print1 = telnetsession1.showPromptPage("Print",iknSerialMaterialPage.IKN_CU850_LABEL_PRINT,dialogPageButtons);
if(print1 == 0)
{
session.setNextPageName("oracle.apps.wip.wma.page.newpage");
}
But the new page is not being called.
Please guide us on how to call the new page.
written by /dev/null , April 15, 2009
Thanks,
written by satish_p , June 22, 2009
Thanks very much for the support on Mobile Supply Chain Application Framework .Tried Hello World Example.
Followed the steps like below
1.Copied the JAVA files CustomTestFunction.java,CustomTestFListener.java,CustomTestPage.java into $CUSTOM_TOP/java/xxx/custom/server
2.Changed the Classpath to append the $CUSTOM_TOP/java
3.Compiled sucessfully the custom java files
4.Created Form Function to point to xxx.custom.server.
5.Attached to Menu WMS_MOB_NAVIGATE
6.Checked with MSCA GUI Client
7.Logged to application with GUI client with option of Trace and choosed the Function XX MSCA Mobile APP test
8.Getting the exception immediately like "Connection Closed"
9.When i check the trace file,getting the Information like below at end of the file
(BG) Setting cursor to [2,1]
(BG) Done MWAClient
(BG) 1245636514500:BG released lock, GivenLocks = 0
(GUI) 1245636514500:GUI got writelock, GivenLocks = -1
(GUI) in drawScreen() ....
(GUI) In drawScreen... But doing nothing !!! ++++++++ !!! +++++++++
(GUI) Start moveCursor to 0
(GUI) OW:in moveCursor() ... 0
(GUI) OraTable: Selecting row 1
(GUI) End moveCursor to 0
(GUI) Setting Message Bar:
(GUI) 1245636514500:GUI released lock, GivenLocks = 0
(BG) [? : -1]
(BG) Available Chars=0
(BG) 1245636514515:BG got writelock, GivenLocks = -1
(GUI) OW:Setting body & table bounds to (0,36,292,330)
(AWT-EventQueue-0) WL: windowDeactivated...
Tried so many ways but still getting the same exception.Finally comming to you.
Environment Details
-----------------------
Oracle Application Release 11i(11.5.2)
ATG_PF.H_RUP5
Can you pls tell me is there any step which is missed by me.
Is it required to bounce the MSCA server.
Pls let me know.
Once again thanks for the help
Thanks
Best Regards
Satish
written by Satish_p , June 22, 2009
Tested with Telnet and observed the same behaviour.
Getting the Error like "Connection to host is lost"
Even seen same behaviour after bouning the MSCA telnet port services
Can you pls advice if anything missed out by me
Thanks
Best Regards
Satish P
written by Satish_p , June 22, 2009
Thanks for the Support.Working with DBA.
Some more points i thought brining to your notice
Existing couple of extensions done before for receipt and Subinventory Transfer working fine through telnet and Client GUI.
I am new to MSCA and required to work on requirement like capturing the additional Information while performing the WIP Issue Transaction.Before trying out the extension,i just started with "Hello World Application"
Let me check with DBA and get back to you
Thanks
Best Regards
Satish P
written by Satish_p , June 26, 2009
Hellow world application worked fine in vision Instance,but it was failed with the message like "Connection Closed" in Project Instance
When we see the log file,it shows like below
[Fri Jun 26 04:55:58 EDT 2009] (Thread-12) MWA_PH_GENERAL_ERROR: General error occurred, disconnecting client and marking its session dropped.
java.lang.UnsupportedClassVersionError: oracle/apps/gepswip/wma/page/CustomTestFunction (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at oracle.apps.mwa.container.ApplicationsObjectLibrary.loadClass(ApplicationsObjectLibrary.java:1354)
at oracle.apps.mwa.container.ApplicationsObjectLibrary.getFirstApplicationName(ApplicationsObjectLibrary.java:727)
at oracle.apps.mwa.container.MenuPageBeanHandler.pageExited(MenuPageBeanHandler.java:21
at oracle.apps.mwa.container.StateMachine.callListeners(StateMachine.java:1612)
at oracle.apps.mwa.container.StateMachine.handleEvent(StateMachine.java:812)
at oracle.apps.mwa.presentation.telnet.PresentationManager.handle(PresentationManager.java:690)
at oracle.apps.mwa.presentation.telnet.ProtocolHandler.run(ProtocolHandler.java:820)
Do you have any Info on this
Thanks
Satish.p
written by Satish_p , June 30, 2009
Issue with mismatch of Java Versions
Compiled code with javac 1.5.0_07 in server.but Jre is setup with java version "1.4.2_04".
Issue was resolved by compiling the code with java version "1.4.2_04"
Thanks for the Support
Thanks
Best Regards
P.Sateesh Kumar
written by srini p , October 01, 2009
I am building HelloWorld Custom page. When user clicks on Submit page I want to call Oracle procedure
(Checked procedure outside and working fine).
But I am getting unexpected error occurred, Please check the log.
Please help me out. I am struck with Custom LOV and want to try this one.
-------------------------------------------------------------------------
Java Custom Page code (Removed some functions, in order to post here (Comments too long))
-------------------------------------------------------------------------
/* Page Class - Which has the Page Layout. We create and add beans to it */
package oracle.apps.mwa.demo;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.CallableStatement;
import java.sql.Types;
import java.sql.SQLException;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.inv.utilities.server.UtilFns;
import oracle.apps.mwa.beans.ButtonFieldBean;
import oracle.apps.mwa.beans.PageBean;
import oracle.apps.mwa.beans.TextFieldBean;
import oracle.apps.mwa.eventmodel.AbortHandlerException;
import oracle.apps.mwa.eventmodel.DefaultOnlyHandlerException;
import oracle.apps.mwa.eventmodel.InterruptedHandlerException;
import oracle.apps.mwa.eventmodel.MWAEvent;
import oracle.apps.mwa.demo.CustomTestFListener;
import oracle.jdbc.driver.*;
import oracle.apps.mwa.container.Session;
//Page Listener Class
public class CustomTestPage extends PageBean {
/**
* Default constructor which just initialises the layout.
*/
public CustomTestPage() {
//Method to initialize the layout
// This method is called when the user clicks the submit button
public void print(MWAEvent mwaevent, TextFieldBean mTextBean) throws SQLException,AbortHandlerException
{
String s = mTextBean.getValue();
String s2 = "PROD-SEARCH";
//Pack slip code call procedure here
String s1 = null;
CallableStatement cstmt = null;
Session ses = new Session();
Connection con = ses.getConnection();
try
{
cstmt = con.prepareCall("{call APPS.XXPHC_REPORTS_UTIL.GET_XXURL(?, ?)}");
cstmt.setString("P_URLTYPE", s2);
cstmt.registerOutParameter("P_OUT_VAL", Types.VARCHAR);
cstmt.execute();
s1 = cstmt.getString("P_OUT_VAL");
}
finally
{
if( cstmt!= null)
cstmt.close();
}
// return s1;
mTextBean.setValue(s2);
//mTextBean.setValue(s+" World");
}
// Method to get handle of TextBean
public TextFieldBean getHelloWorld() {
return mHelloWorld;
}
// Create the Bean Variables
TextFieldBean mHelloWorld;
protected ButtonFieldBean mSubmit;
}
-------------------------------------------------------------------------
System Log
-------------------------------------------------------------------------
[Thu Oct 01 11:49:23 EDT 2009] (Thread-15) MWA_PM_UNEXPECTED_ERROR_MESG: Unexpected error occurred, Please
check the log.
java.lang.NullPointerException
at oracle.apps.mwa.container.ApplicationsObjectLibrary.getConnection
(ApplicationsObjectLibrary.java:1020)
at oracle.apps.mwa.container.BaseSession.getConnection(BaseSession.java:205)
at oracle.apps.mwa.demo.CustomTestPage.print(CustomTestPage.java:114)
at oracle.apps.mwa.demo.CustomTestFListener.fieldExited(CustomTestFListener.java:43)
at oracle.apps.mwa.container.StateMachine.callListeners(StateMachine.java:1720)
at oracle.apps.mwa.container.StateMachine.handleEvent(StateMachine.java:543)
at oracle.apps.mwa.presentation.telnet.PresentationManager.handle(PresentationManager.java:702)
at oracle.apps.mwa.presentation.telnet.ProtocolHandler.run(ProtocolHandler.java:820)
[Thu Oct 01 11:49:23 EDT 2009] (Thread-15) MWA_PM_UNEXPECTED_ERROR_MESG: Unexpected error occurred, Please
check the log.
java.lang.NullPointerException
at oracle.apps.mwa.container.ApplicationsObjectLibrary.getConnection
(ApplicationsObjectLibrary.java:1020)
at oracle.apps.mwa.container.BaseSession.getConnection(BaseSession.java:205)
at oracle.apps.mwa.demo.CustomTestPage.print(CustomTestPage.java:114)
at oracle.apps.mwa.demo.CustomTestFListener.fieldExited(CustomTestFListener.java:43)
at oracle.apps.mwa.container.StateMachine.callListeners(StateMachine.java:1720)
at oracle.apps.mwa.container.StateMachine.handleEvent(StateMachine.java:543)
at oracle.apps.mwa.presentation.telnet.PresentationManager.handle(PresentationManager.java:702)
at oracle.apps.mwa.presentation.telnet.ProtocolHandler.run(ProtocolHandler.java:820)
----------------------------------------------------------------------------------------------------------
written by srini p , October 02, 2009
Session ses = getSession();
This code worked. Thanks for your help. As you suggested I was uploaded LOV code to your forum. Could you please look at my code let me know what I am doing wrong.
Thanks a ton for your help.
Regards,
Srini.
written by srini p , October 12, 2009
I was struck with Custom Lov and so thought of achiving same functinality with Custom List Box.
When I try to build List box from Database. I am getting errors and exceptions.
----------------------------------------------------------------------------------------------------------------------
System Log
--------------------
[Fri Oct 09 08:54:14 EDT 2009] **************** MWA Version 1.0.8.4 *****************
[Fri Oct 09 08:54:14 EDT 2009] ***************** Start New Logging ******************
[Fri Oct 09 08:54:49 EDT 2009] (Thread-12) SM_EXCEPTION: Exception occurred with user SPADMALA
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at oracle.apps.mwa.container.StateMachine.loadPage(StateMachine.java:1409)
at oracle.apps.mwa.container.StateMachine.loadMenuItem(StateMachine.java:1617)
at oracle.apps.mwa.container.StateMachine.handleEvent(StateMachine.java:1002)
at oracle.apps.mwa.presentation.telnet.PresentationManager.handle(PresentationManager.java:702)
at oracle.apps.mwa.presentation.telnet.ProtocolHandler.run(ProtocolHandler.java:820)
Caused by: java.lang.NullPointerException
at oracle.apps.mwa.demo.CustomTestPage.getPrinterNames(CustomTestPage.java:192)
at oracle.apps.mwa.demo.CustomTestPage.initLayout(CustomTestPage.java:105)
at oracle.apps.mwa.demo.CustomTestPage.(CustomTestPage.java:43)
... 9 more
[Fri Oct 09 08:54:49 EDT 2009] (Thread-12) SM_EXCEPTION: Exception occurred with user SPADMALA
java.lang.NullPointerException
at oracle.apps.mwa.demo.CustomTestPage.getPrinterNames(CustomTestPage.java:192)
at oracle.apps.mwa.demo.CustomTestPage.initLayout(CustomTestPage.java:105)
at oracle.apps.mwa.demo.CustomTestPage.(CustomTestPage.java:43)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at oracle.apps.mwa.container.StateMachine.loadPage(StateMachine.java:1409)
at oracle.apps.mwa.container.StateMachine.loadMenuItem(StateMachine.java:1617)
at oracle.apps.mwa.container.StateMachine.handleEvent(StateMachine.java:1002)
at oracle.apps.mwa.presentation.telnet.PresentationManager.handle(PresentationManager.java:702)
at oracle.apps.mwa.presentation.telnet.ProtocolHandler.run(ProtocolHandler.java:820)
[Fri Oct 09 09:07:48 EDT 2009] (Thread-12) PH: User got disconnected...
[Fri Oct 09 09:07:48 EDT 2009] (Thread-12) PH: caught IOException
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:16
at java.net.SocketInputStream.read(SocketInputStream.java:182)
at java.io.FilterInputStream.read(FilterInputStream.java:66)
at java.io.PushbackInputStream.read(PushbackInputStream.java:120)
at oracle.apps.mwa.presentation.telnet.ProtocolHandler.readChar(ProtocolHandler.java:133
at oracle.apps.mwa.presentation.telnet.ProtocolHandler.enterData(ProtocolHandler.java:1599)
at oracle.apps.mwa.presentation.telnet.ProtocolHandler.run(ProtocolHandler.java:80
------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks,
Srini.
written by srini p , October 12, 2009
In case LOV I am getting (Unsuccessful row construction) and uploaded LOV related source code, Oracle Procedure and Log files to Forum.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
In case of List Box (Menu doesn't appear). and Uploading List Box related source code, Oracle Procedure and Log files to Forum.
Thanks for your help.
Srini.
written by aligeldi , April 21, 2010
written by Senthilkumar Shanmugam1 , April 21, 2010
Can you please paste the error message or log file information?
Thanks,
Senthil
written by aligeldi , April 21, 2010
//Page Listener Class
package xxxt.oracle.apps.inv.mo.server ;
import oracle.apps.mwa.beans.*;
import oracle.apps.mwa.container.*;
import oracle.apps.mwa.eventmodel.*;
import xxxt.oracle.apps.inv.mo.server.XxxtDebug;
import oracle.apps.inv.utilities.server.*;
import xxxt.oracle.apps.inv.lov.server.*;
import oracle.apps.inv.mo.server.*;
import java.sql.SQLException;
public class XxxtTeslimatNoGirisPage extends PageBean {
/**
* Default constructor which just initialises the layout.
*/
// Create the Bean Variables
LOVFieldBean mDelivLOV;
//LOVFieldBean mDelivLOV;
TextFieldBean mHelloWorld;
protected ButtonFieldBean mIleri;
protected ButtonFieldBean mGeri;
protected ButtonFieldBean mIlkKayit;
protected ButtonFieldBean mSonKayit;
protected ButtonFieldBean mSevkEt;
TextFieldBean mSeriNo;
TextFieldBean mKalemKod;
TextFieldBean mAcikalama;
TextFieldBean mTeslimatNo;
TextFieldBean mId;
XxxtDebug debug;
public XxxtTeslimatNoGirisPage()
{
//Method to initialize the layout
initLayout();
}
/**
* Does the initialization of all the fields. Creates new instances
* and calls the method to set the prompts which may have to be later
* moved to the page enter event if we were using AK prompts as we
* require the session for the same.
*/
private void initLayout()
{
//Create a Text Filed and Set an ID
//mDelivLOV = new XxxtDeliveryLOV("MO");
mDelivLOV = new LOVFieldBean();
mDelivLOV.setName("DelivNumber");
mDelivLOV.setRequired(true);
mDelivLOV.setValidateFromLOV(false);
mSeriNo = new TextFieldBean();
mSeriNo.setName("SERINO");
mSeriNo.setRequired(true);
mKalemKod = new TextFieldBean();
mKalemKod.setName("KALEMKOD");
mKalemKod.setRequired(true);
//mKalemKod.setEditable(false);
mAcikalama = new TextFieldBean();
mAcikalama.setName("ACIKLAMA");
//mAcikalama.setEditable(false);
mAcikalama.setRequired(true);
mId = new TextFieldBean();
mId.setName("ID");
mIleri = new ButtonFieldBean();
mIleri.setName("ILERI");
mGeri = new ButtonFieldBean();
mGeri.setName("GERI");
mIlkKayit = new ButtonFieldBean();
mIlkKayit.setName("ILKKAYIT");
mSonKayit = new ButtonFieldBean();
mSonKayit.setName("SONKAYIT");
mSevkEt = new ButtonFieldBean();
mSevkEt.setName("SEVKET");
//add the fields
addFieldBean(mDelivLOV);
addFieldBean(mSeriNo);
addFieldBean(mKalemKod);
addFieldBean(mAcikalama);
addFieldBean(mId);
//addFieldBean(mHelloWorld);
addFieldBean(mIlkKayit);
addFieldBean(mGeri);
addFieldBean(mIleri);
addFieldBean(mSonKayit);
addFieldBean(mSevkEt);
//add field listener to all necessary fields
XxxtTeslimatNoGirisFListener fieldListener = new XxxtTeslimatNoGirisFListener();
mDelivLOV.addListener(fieldListener);
//mHelloWorld.addListener(fieldListener);
mGeri.addListener(fieldListener);
mIleri.addListener(fieldListener);
mIlkKayit.addListener(fieldListener);
mSonKayit.addListener(fieldListener);
mSevkEt.addListener(fieldListener);
mSeriNo.addListener(fieldListener);
//call this method to initialize the prompts
this.setHiddenValues();
this.initPrompts();
}
/**
* Method that sets all the prompts up.
*/
private void initPrompts()
{
// sets the page title
this.setPrompt("Teslimat No Giris Sayfasi");
// set the prompts for all the remaining fields
//mHelloWorld.setPrompt("Enter Your Name");
mSeriNo.setPrompt("Seri No");
mKalemKod.setPrompt("Kalem Kod");
mAcikalama.setPrompt("Açiklama ");
mId.setPrompt("Id");
mIleri.setPrompt("Ileri");
mGeri.setPrompt("Geri");
mIlkKayit.setPrompt("Basa Git");
mSonKayit.setPrompt("Sona Git");
mSevkEt.setPrompt("Sevk Et");
mDelivLOV.setPrompt("Teslimat No");
}
//Method called when the page is entered
public void pageEntered(MWAEvent e)
{
try
{
Session ses = e.getSession();
String type = "page entered!";
String hata = "hata";
debug = new XxxtDebug();
debug.insertDebugStrings(type,hata ,ses);
}catch(Exception ex){;}
}
//Method called when the page is exited
public void pageExited(MWAEvent e)
{}
}
written by aligeldi , April 21, 2010
written by aligeldi , April 21, 2010
[Wed Apr 21 17:21:24 EEST 2010] (Thread-13) ValidateOrgPage: Page Exit entered
[Wed Apr 21 17:21:24 EEST 2010] (Thread-13) InvOrganizationPageBean: pageExited
[Wed Apr 21 17:21:24 EEST 2010] (Thread-13) InvOrganizationPageBean: Old OrgId is 363
[Wed Apr 21 17:21:24 EEST 2010] (Thread-13) InvOrganizationPageBean: Current OrgId is 363
[Wed Apr 21 17:21:24 EEST 2010] (Thread-13) MFG_ORGANIZATION_ID's value set ? true
[Wed Apr 21 17:21:24 EEST 2010] (Thread-13) User LOV Entered
[Wed Apr 21 17:21:24 EEST 2010] (Thread-13) Error in calling LOV
[Wed Apr 21 17:21:35 EEST 2010] (Thread-13) User LOV Exited
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) setOrgParameters: Org id = 363
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) setOrgContext: Org id = 363
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) UtilFns:process:{call INV_PROJECT.SET_SESSION_PARAMETERS(?,?,?,?)}
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) UtilFns:process:execution complete
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) UtilFns:process:value pair retrieval complete
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) Closing Statement
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) after closing
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) OrgFunction: AppEntered - MFG_ORGANIZATION_ID's value set ? true
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) OrgFunction Date1271856258000
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) OrgFunction Orgid363
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) long tempDate1271856258000
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) Timestamp tm2010-04-21 16:24:18.0
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) UtilFns:process:{call INV_INV_LOVS.tdatechk(?,?,?)}
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) UtilFns:process:execution complete
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) UtilFns:process:value pair retrieval complete
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) Closing Statement
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) after closing
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) VALID PERIOD CHECK SUCCESS
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) User LOV Entered
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) Error in calling LOV
[Wed Apr 21 17:24:29 EEST 2010] (Thread-13) User LOV Exited
[Wed Apr 21 17:24:18 EEST 2010] (Thread-13) Error in calling LOV
[Wed Apr 21 17:24:29 EEST 2010] (Thread-13) User LOV Exited
[Wed Apr 21 17:26:15 EEST 2010] (Thread-13) Employee ID :null
[Wed Apr 21 17:26:15 EEST 2010] (Thread-13) Organization ID :363
[Wed Apr 21 17:26:15 EEST 2010] (Thread-13) Executing the J Patch Set Code
[Wed Apr 21 17:26:15 EEST 2010] (Thread-13) Error java.lang.NumberFormatException: null
[Wed Apr 21 17:27:23 EEST 2010] (Thread-13) Employee ID :null
[Wed Apr 21 17:27:23 EEST 2010] (Thread-13) Organization ID :null
[Wed Apr 21 17:27:41 EEST 2010] (Thread-13) ValidateOrgPage: Page Enter entered
[Wed Apr 21 17:27:41 EEST 2010] (Thread-13) ValidateOrgPage: Page Enter entered
[Wed Apr 21 17:27:43 EEST 2010] (Thread-13) ValidateOrgPage: Page Exit entered
[Wed Apr 21 17:27:43 EEST 2010] (Thread-13) InvOrganizationPageBean: pageExited
[Wed Apr 21 17:27:43 EEST 2010] (Thread-13) InvOrganizationPageBean: Old OrgId is
[Wed Apr 21 17:27:43 EEST 2010] (Thread-13) InvOrganizationPageBean: Current OrgId is 363
[Wed Apr 21 17:27:43 EEST 2010] (Thread-13) Resetting the Organization parameters
[Wed Apr 21 17:27:43 EEST 2010] (Thread-13) setOrgParameters: Org id = 363
[Wed Apr 21 17:27:43 EEST 2010] (Thread-13) setOrgContext: Org id = 363
[Wed Apr 21 17:27:43 EEST 2010] (Thread-13) UtilFns:process:{call INV_PROJECT.SET_SESSION_PARAMETERS(?,?,?,?)}
[Wed Apr 21 17:27:43 EEST 2010] (Thread-13) UtilFns:process:execution complete
[Wed Apr 21 17:27:43 EEST 2010] (Thread-13) UtilFns:process:value pair retrieval complete
[Wed Apr 21 17:27:43 EEST 2010] (Thread-13) Closing Statement
[Wed Apr 21 17:27:43 EEST 2010] (Thread-13) after closing
[Wed Apr 21 17:27:43 EEST 2010] (Thread-13) MFG_ORGANIZATION_ID's value set ? true
[Wed Apr 21 17:27:43 EEST 2010] (Thread-13) ValidateOrgPage: Page Exit entered
[Wed Apr 21 17:27:43 EEST 2010] (Thread-13) InvOrganizationPageBean: pageExited
[Wed Apr 21 17:27:43 EEST 2010] (Thread-13) InvOrganizationPageBean: Old OrgId is 363
[Wed Apr 21 17:27:43 EEST 2010] (Thread-13) InvOrganizationPageBean: Current OrgId is 363
[Wed Apr 21 17:27:43 EEST 2010] (Thread-13) MFG_ORGANIZATION_ID's value set ? true
[Wed Apr 21 17:27:43 EEST 2010] (Thread-13) User LOV Entered
[Wed Apr 21 17:27:43 EEST 2010] (Thread-13) Error in calling LOV
[Wed Apr 21 17:28:43 EEST 2010] (Thread-13) User LOV Exited
written by aligeldi , April 26, 2010
[Tue Apr 13 15:25:40 EEST 2010] (Thread-13) ValidateOrgPage: Page Enter entered
[Tue Apr 13 15:25:40 EEST 2010] (Thread-13) ValidateOrgPage: Page Enter entered
[Tue Apr 13 15:25:42 EEST 2010] (Thread-13) ValidateOrgPage: Page Exit entered
[Tue Apr 13 15:25:42 EEST 2010] (Thread-13) InvOrganizationPageBean: pageExited
[Tue Apr 13 15:25:42 EEST 2010] (Thread-13) InvOrganizationPageBean: Old OrgId i
s
[Tue Apr 13 15:25:42 EEST 2010] (Thread-13) InvOrganizationPageBean: Current Org
Id is 363
[Tue Apr 13 15:25:42 EEST 2010] (Thread-13) Resetting the Organization parameter
s
[Tue Apr 13 15:25:42 EEST 2010] (Thread-13) setOrgParameters: Org id = 363
[Tue Apr 13 15:25:42 EEST 2010] (Thread-13) setOrgContext: Org id = 363
@
"10202.INV.log" 1021 lines, 68377 characters
[Mon Apr 26 11:11:31 EEST 2010] (Thread-13) MFG_ORGANIZATION_ID's value set ? tr
ue
[Mon Apr 26 11:11:31 EEST 2010] (Thread-13) ValidateOrgPage: Page Exit entered
[Mon Apr 26 11:11:31 EEST 2010] (Thread-13) InvOrganizationPageBean: pageExited
[Mon Apr 26 11:11:31 EEST 2010] (Thread-13) InvOrganizationPageBean: Old OrgId i
s 363
[Mon Apr 26 11:11:31 EEST 2010] (Thread-13) InvOrganizationPageBean: Current Org
Id is 363
[Mon Apr 26 11:11:31 EEST 2010] (Thread-13) MFG_ORGANIZATION_ID's value set ? tr
ue
[Mon Apr 26 11:11:31 EEST 2010] (Thread-13) XxxtTeslimatNoGirisPage: constructor
written by aligeldi , April 26, 2010
Thanks a lot.
written by Stelios , May 04, 2010
I have no problem of compiling the "CustomTestFunction.java". What I am missing here ?
written by Senthilkumar Shanmugam1 , May 04, 2010
What is the error you are getting while compilation?
-Senthil
written by Stelios , May 04, 2010
Regards,
Stelios
written by Mik , May 10, 2010
When I performing the Misc Receipt Transaction and trying to enter Serial Number, I am getting the below error message:
Error :java.lang.NullPointerException
Please help
Thanks
Mike
written by GirishNarne , September 22, 2010
I have developed a custom mobile page and need to initialize variables. I have added the initialization logic in the pageEntered method in the java class extending the PageBean. But the pageEntered is not being invoked by the page. Could you please help me in resolving this issue.
Thanks,
Girish.
written by GirishNarne , September 23, 2010
I am unable to paste the code as I get a message saying comment is too long. Is there any mail Id where I can send my code.
Regards,
Girish.
written by shailendra_singh , November 02, 2010
i want to change the logo og oracle gui mobile client .
can u please telll me how to change log..
thanks
shailendra
written by Miklos , November 15, 2010
Could You please help me.
I tried to deploy the Hello World Mobile Supply Chain Application Framework, but attempting to lunch it I receive the following error:
Couldn't load given class : oracle.apps.fnd.hu.xxsys.mwaextension.MWAExtendedClass
java.lang.ClassNotFoundException: oracle.apps.fnd.hu.xxsys.mwaextension.MWAExtendedClass
I developed and compiled it locally, and deployed as a jar (mwaextention.jar)
- MWAExtendedClass
- MWAExtendedPage
- MWAExtendedFieldListener
The package was added with full path to $CLASSPATH and the MWA server was bounced.
The package structure
oracle.apps.fnd.hu.xxsys.mwaextension – contains the 3 class files
CLASSPATH
/u01/applmgr/yyyytestcomn/java/hu/xxsys/mwaextension/mwaextension.jar
Many thanks in advance,
Miklos
written by Miklos , November 16, 2010
Thank You for Your reply.
Yes, the $JAVA_TOP is /u01/applmgr/yyyytestcomn/java
The directory where the jar file is placed is /u01/applmgr/yyyycomn/java/hu/xxsys/mwaextension
Furthermore the package itself was added to $CLASSPATH.
What is strange to me, the class files are in hu.xxsys.mwaextension package, but as the log file showed the class loader tried to load them from oracle.apps.fnd.hu.xxsys.mwaextension.
Why does the class loader “prefix” the class as defined at the function in the system with oracle.apps.fnd?
hu.xxsys.mwaextension.MWAExtendedClass -> oracle.apps.fnd.hu.xxsys.mwaextension.MWAExtendedClass
Thank You for Your help.
Regards,
Miklos
written by Miklos , November 16, 2010
I bag Your pardon I know that it is more then ironic, but…
No, the HTML function name started with hu, and not with 'oracle/apps/fnd'
In the meantime I refactored the app to the original naming You used:
Package: xxx.custom.server
Files: CustomTestFunction,class CustomTestPage.class, CustomTestFListener.class
Deployment:
- create directory under $JAVA_TOP/xxx/custom/server
- checked that $JAVA_TOP is added to the $CLASSPATH
- copy the 3 class file into the $JAVA_TOP/xxx/custom/server directory
- change file and directory permission (for testing) to 777
The form function is registered XXRA_MWA_TEST -> xxx.custom.server.CustomTestFunction
Trying to run from the menu the log file shows:
Couldn't load given class : oracle.apps.fnd.xxx.custom.server.CustomTestFunction
java.lang.ClassNotFoundException: oracle.apps.fnd.xxx.custom.server.CustomTestFunction
Refactor the package to oracle.apps.fnd.xxx.custom.server and subdirectories reflecting this new structure are created, and files placed in this directory.
Error message in log file is the same.
Certainly I do not give up, could You please give me any further hint?
Many thanks in advance and regards,
Miklos
written by Miklos , November 17, 2010
The result is in both cases:
FUNCTION_NAME WEB_HTML_CALL
---------------------------------------------------
XXRA_MWA_TEST xxx.custom.server.CustomTestFunction
Thank You,
Miklos
written by Miklos , November 18, 2010
My good, the error message in log is completely misleading. We compiled the files on the server and WORKS!
As far as I remember one claimed yet for similar problem, so it seems to be wise not to copy the locally compiled class files on the server, even if it is easier for one like me, who has only limited access to the server.
Otherwise in the meantime I extended Your sample app. with a couple of new functionality, I hope You do not mind :-):-)
Thank You for Your valuable time spent on my issue, and have a nice day!
Regards,
Miklos
written by jaja , September 02, 2011
I have following situation:
I have added two buttons in this order
(Done first, Cancel second at the bottom of the page):
public oracle.apps.mwa.beans.ButtonFieldBean mDone;
public oracle.apps.mwa.beans.ButtonFieldBean mCancel;
and the same listeners for both
mDone.addListener(mListener)
mCancel.addListener(mListener)
The problem is when the focus is on the some field and I want to click Cancel button.
In that case mListener.fieldEntered and mListener.fieldExited is executed
for both mDone and mCancel, and I want to be executed only
for mCancel
Generally - when I jump from one field to another,
mListener.fieldEntered and mListener.fieldExited methods are executed
for all fields between those two. Problem is that focus doesn’t jump
directly from one field to another but goes through all fields between
those two.
jaja
written by jaja , September 05, 2011
Thank you for your quick answer.
I’ve made some short example to show you my problem. Down is source code (XXPage and XXListener) and system.log for the case when the cursor is on field1 and then is clicked on field3 ( field2 is between). As I mentioned before problem is that XXListner.fieldEntered and XXListener.filedExited are executed for field2 (see log).
XXPage short code:
public class XXPage extends PageBean
{
public TextFieldBean text1;
public TextFieldBean text2;
public TextFieldBean text3;
public oracle.apps.mwa.beans.ButtonFieldBean mDone;
public oracle.apps.mwa.beans.ButtonFieldBean mCancel;
public XXPage() {
initLayout();
}
public void initLayout(){
XXListener xxListener = new XXListener();
UtilFns.trace("CustomPage before text1 field");
text1 = new TextFieldBean();
text1.setName("INV.TEXT1");
text1.setPrompt("text 1");
text1.addListener(xxListener);
UtilFns.trace("CustomPage before text2 field");
text2 = new TextFieldBean();
text2.setName("INV.TEXT2");
text2.setPrompt("text 2");
text2.addListener(xxListener);
UtilFns.trace("CustomPage before text3 field");
text3 = new TextFieldBean();
text3.setName("INV.TEXT3");
text3.setPrompt("text 3");
text3.addListener(xxListener);
mDone = new ButtonFieldBean();
mDone.setName("INV.XX_DONE");
mDone.setPrompt("Done");
mDone.addListener(xxListener);
mCancel = new ButtonFieldBean();
mCancel.setName("INV.XX_CANCEL");
mCancel.setPrompt("Cancel");
mCancel.addListener(xxListener);
this.addFieldBean(text1);
this.addFieldBean(text2);
this.addFieldBean(text3);
this.addFieldBean(mDone);
this.addFieldBean(mCancel);
}
}
XXListener code:
public class XXListener implements MWAFieldListener {
XXPage mCurrPg;
Session ses;
public XXListener() {
}
public void fieldEntered(MWAEvent mwaevent) throws AbortHandlerException,
InterruptedHandlerException, DefaultOnlyHandlerException {
if (ses == null)ses = mwaevent.getSession();
if (mCurrPg == null) mCurrPg = (XXPage)ses.getCurrentPage();
String field = UtilFns.fieldEnterSource(ses);
UtilFns.trace("XX entered filed = " + field);
ses.setRefreshScreen(true);
}
public void fieldExited(MWAEvent mwaevent) throws AbortHandlerException,
InterruptedHandlerException, DefaultOnlyHandlerException {
if (ses == null)ses = mwaevent.getSession();
if (mCurrPg == null) mCurrPg = (XXPage)ses.getCurrentPage();
String field = UtilFns.fieldEnterSource(ses);
UtilFns.trace("XX field = " + field);
ses.setRefreshScreen(true);
}
}
jaja
written by jaja , September 05, 2011
system.log:
(Thread-17) PH.run - before PM handle
(Thread-17) PM - handle enter
(Thread-17) PM - reset session variables
(Thread-17) PM - verify inputs
(Thread-17) Entered Input:
(Thread-17) Pre-preocessing the inv scan
(Thread-17) Trying to load custom class oracle.apps.inv.lov.server.InvScanManager
(Thread-17) Found and invoking custom class
(Thread-17) Alias processing
(Thread-17) Alias: Return:
(Thread-17) PM - call to InputableFieldBean
(Thread-17) PM - return InputableFieldBean
(Thread-17) PM - check for data stream character
(Thread-17) PM - swith to actionCode 13
(Thread-17) PM - Action MWA_TAB
(Thread-17) ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it ) callListeners: executing 1 listeners, action = 1
(Thread-17) ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it ) callListeners: FieldBean
(Thread-17) ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it ) callListeners: fieldExited() for INV.TEXT1, Listener=oracle.apps.xxin.invtxn.server.XXListener
(Thread-17) ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it ) handleEvent: going to next field
(Thread-17) setCurrentFieldIndex: i = 1 = INV.TEXT2
(Thread-17) ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it ) callListeners: executing 1 listeners, action = 0
(Thread-17) ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it ) callListeners: FieldBean
(Thread-17) ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it ) callListeners: fieldEntered() for INV.TEXT2, Listener=oracle.apps.xxin.invtxn.server.XXListener
(Thread-17) ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it ) handleEvent: done (pageIx = 3, fieldIx = 1, memory used = 60088480)
(Thread-17) PM - After switch action
(Thread-17) PM - curtSession not null
(Thread-17) in initializePage...
(Thread-17) Start getCustomPage, page=oracle.apps.xxin.invtxn.server.XXPage at Mon Sep 05 08:24:39 CEST 2011
(Thread-17) PM - existingPage
(Thread-17) PM - initializeArrays
(Thread-17) PM - check for PageBean
(Thread-17) PM - after InitializePage
(Thread-17) PM - handle exit
(Thread-17) PH.run - after PM handle
(Thread-17) PH.run - while true
(Thread-17) PH.run - while true PM.m_drawScreen
(Thread-17) PH.run - while true PM.m_upArrow
(Thread-17) PH.run - while true PM.m_isNormalText
(Thread-17) PH.run - while true PM.m_highlightedList
(Thread-17) PH.run - while true PM.m_highlightText
(Thread-17) PH.run - while true PM.personalization check
(Thread-17) PH.run - before PM handle
(Thread-17) PM - handle enter
(Thread-17) PM - reset session variables
(Thread-17) PM - verify inputs
(Thread-17) Entered Input:
(Thread-17) Pre-preocessing the inv scan
(Thread-17) Trying to load custom class oracle.apps.inv.lov.server.InvScanManager
(Thread-17) Found and invoking custom class
(Thread-17) Alias processing
(Thread-17) Alias: Return:
(Thread-17) PM - call to InputableFieldBean
(Thread-17) PM - return InputableFieldBean
(Thread-17) PM - check for data stream character
(Thread-17) PM - swith to actionCode 13
(Thread-17) PM - Action MWA_TAB
(Thread-17) ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it ) callListeners: executing 1 listeners, action = 1
(Thread-17) ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it ) callListeners: FieldBean
(Thread-17) ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it ) callListeners: fieldExited() for INV.TEXT2, Listener=oracle.apps.xxin.invtxn.server.XXListener
(Thread-17) ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it ) handleEvent: going to next field
(Thread-17) setCurrentFieldIndex: i = 2 = INV.TEXT3
(Thread-17) ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it ) callListeners: executing 1 listeners, action = 0
(Thread-17) ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it ) callListeners: FieldBean
(Thread-17) ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it ) callListeners: fieldEntered() for INV.TEXT3, Listener=oracle.apps.xxin.invtxn.server.XXListener
(Thread-17) ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it ) handleEvent: done (pageIx = 3, fieldIx = 2, memory used = 60123952)
(Thread-17) PM - After switch action
(Thread-17) PM - curtSession not null
(Thread-17) in initializePage...
(Thread-17) Start getCustomPage, page=oracle.apps.xxin.invtxn.server.XXPage at Mon Sep 05 08:24:39 CEST 2011
(Thread-17) PM - existingPage
(Thread-17) PM - initializeArrays
(Thread-17) PM - check for PageBean
(Thread-17) PM - after InitializePage
(Thread-17) PM - handle exit
(Thread-17) PH.run - after PM handle
(Thread-17) PH.run - while true
(Thread-17) PH.run - while true PM.m_drawScreen
(Thread-17) PH.run - while true PM.m_upArrow
(Thread-17) PH.run - while true PM.m_isNormalText
(Thread-17) PH.run - while true PM.m_highlightedList
(Thread-17) PH.run - while true PM.m_highlightText
(Thread-17) PH.run - while true PM.personalization check
jaja
written by Phu Tri Nguyen , September 07, 2011
I'm very new to java class and MSCA. I create the three java files and and compile them.
CustomTestFunction.java : compiled successfully
CustomTestPage.java: I have three errors
cannot find symbol
symbol : class CustomTestFListener
location: package xxx.custom.server
import xxx.custom.server.CustomTestFListener;
symbol : class CustomTestFListener
location: class xxx.custom.server.CustomTestPage
new CustomTestFListener();
symbol : class CustomTestFListener
location: class xxx.custom.server.CustomTestPage
CustomTestFListener fieldListener =
CustomTestFListener.java: has 2 errors
symbol : class CustomTestPage
location: class xxx.custom.server.CustomTestFListener
CustomTestPage pg;
symbol : class CustomTestPage
location: class xxx.custom.server.CustomTestFListener
pg = (CustomTestPage)ses.getCurrentPage();
It seems like the last two files are related. Please help.
Thank in advance.
PhuTri
written by Phu Tri Nguyen , September 07, 2011
I compiled them seperately in EBS environment. I created three java programs exactly as they show in the top of the page. Here are the commands that I use to compile them
javac -verbose /d01/oracle/DEV1/apps/apps_st/appl/xxc/12.0.0/java/CustomTestPage.java
javac -verbose /d01/oracle/DEV1/apps/apps_st/appl/xxc/12.0.0/java/CustomTestFListener.java
How can I send the sourcode and error message to you?
Thank you for helping.
PhuTri
written by Phu Tri Nguyen , September 08, 2011
/* Page Class - Which has the Page Layout. We create and add beans to it */
package xxx.custom.server;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.inv.utilities.server.UtilFns;
import oracle.apps.mwa.beans.ButtonFieldBean;
import oracle.apps.mwa.beans.PageBean;
import oracle.apps.mwa.beans.TextFieldBean;
import oracle.apps.mwa.eventmodel.AbortHandlerException;
import oracle.apps.mwa.eventmodel.DefaultOnlyHandlerException;
import oracle.apps.mwa.eventmodel.InterruptedHandlerException;
import oracle.apps.mwa.eventmodel.MWAEvent;
import xxx.custom.server.CustomTestFListener;
//Page Listener Class
public class CustomTestPage extends PageBean {
/**
* Default constructor which just initialises the layout.
*/
public CustomTestPage() {
//Method to initialize the layout
initLayout();
}
/**
* Does the initialization of all the fields. Creates new instances
* and calls the method to set the prompts which may have to be later
* moved to the page enter event if we were using AK prompts as we
* require the session for the same.
*/
private void initLayout() {
//Logging
if (UtilFns.isTraceOn)
UtilFns.trace("CustomPage initLayout");
//Create a Text Filed and Set an ID
mHelloWorld = new TextFieldBean();
mHelloWorld.setName("TEST.HELLO");
// Create a Submit Button and set an ID
mSubmit = new ButtonFieldBean();
mSubmit.setName("TEST.SUBMIT");
//add the fields
addFieldBean(mHelloWorld);
addFieldBean(mSubmit);
//add field listener to all necessary fields
CustomTestFListener fieldListener =
new CustomTestFListener();
mHelloWorld.addListener(fieldListener);
mSubmit.addListener(fieldListener);
//call this method to initializa the prompts
this.initPrompts();
}
/**
* Method that sets all the prompts up.
*/
private void initPrompts() {
UtilFns.trace(" Custom Page - Init Prompts");
// sets the page title
this.setPrompt("Test Custom Page");
// set the prompts for all the remaining fields
mHelloWorld.setPrompt("Enter Your Name");
mSubmit.setPrompt("Submit");
//please note that we should not hard code page name and prompts
//as it may cause translation problems
//we have an different procedure to overcome this
}
// This method is called when the user clicks the submit button
public void print(MWAEvent mwaevent, TextFieldBean mTextBean) throws AbortHandlerException
{
UtilFns.trace(" Custom Page - print ");
// Get the value from Text bean and append hello world
// and display it to user on the same field
String s = mTextBean.getValue();
mTextBean.setValue(s+" Hello World");
}
// Method to get handle of TextBean
public TextFieldBean getHelloWorld() {
return mHelloWorld;
}
//Method called when the page is entered
public void pageEntered(MWAEvent e) throws AbortHandlerException,
InterruptedHandlerException,
DefaultOnlyHandlerException {
UtilFns.trace(" Custom Page - pageEntered ");
}
//Method called when the page is exited
public void pageExited(MWAEvent e) throws AbortHandlerException,
InterruptedHandlerException,
DefaultOnlyHandlerException {
UtilFns.trace(" Custom Page - pageExited ");
}
// Create the Bean Variables
TextFieldBean mHelloWorld;
protected ButtonFieldBean mSubmit;
}
written by Phu Tri Nguyen , September 08, 2011
/* Listener Class - Handles all events */
package xxx.custom.server;
import oracle.apps.inv.utilities.server.UtilFns;
import oracle.apps.mwa.beans.FieldBean;
import oracle.apps.mwa.container.Session;
import oracle.apps.mwa.eventmodel.AbortHandlerException;
import oracle.apps.mwa.eventmodel.DefaultOnlyHandlerException;
import oracle.apps.mwa.eventmodel.InterruptedHandlerException;
import oracle.apps.mwa.eventmodel.MWAEvent;
import oracle.apps.mwa.eventmodel.MWAFieldListener;
public class CustomTestFListener implements MWAFieldListener {
public CustomTestFListener() {
}
public void fieldEntered(MWAEvent mwaevent) throws AbortHandlerException,InterruptedHandlerException, DefaultOnlyHandlerException {
UtilFns.trace("Inside Field Entered");
ses = mwaevent.getSession();
String s = UtilFns.fieldEnterSource(ses);
// Prints the Current Bean's ID
UtilFns.trace("CustomFListener:fieldEntered:fldName = " + s);
}
public void fieldExited(MWAEvent mwaevent) throws AbortHandlerException, InterruptedHandlerException, DefaultOnlyHandlerException {
String s = ((FieldBean)mwaevent.getSource()).getName();
// Prints the Current Bean's ID
UtilFns.trace("CustomFListener:fieldExited:fldName = " + s);
// Get handle to session and page
Session ses = mwaevent.getSession();
pg = (CustomTestPage)ses.getCurrentPage();
// when the user clicks the Submit button call the method to print
// Hello world with the text entered in text box
if (s.equals("TEST.SUBMIT")) {
pg.print(mwaevent,pg.getHelloWorld());
return;
}
}
// Varibale declaration
CustomTestPage pg;
Session ses;
}
written by Phu Tri Nguyen , September 08, 2011
[search path for source files: /d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/lib/dt.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/lib/tools.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/rt.jar,/d01/oracle/DEV1/apps/apps_st/comn/java/lib/appsborg.zip,/d01/oracle/DEV1/apps/tech_st/10.1.2/forms/java,/d01/oracle/DEV1/apps/tech_st/10.1.2/forms/java/frmall.jar,/d01/oracle/DEV1/apps/tech_st/10.1.2/jlib/ewt3.jar,/d01/oracle/DEV1/apps/tech_st/10.1.2/j2ee/OC4J_BI_Forms/applications/formsapp/formsweb/WEB-INF/lib/frmsrv.jar,/d01/oracle/DEV1/apps/apps_st/comn/java/classes]
[search path for class files: /d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/resources.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/rt.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/sunrsasign.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/jsse.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/jce.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/charsets.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/classes,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/ext/sunjce_provider.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/ext/localedata.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/ext/dnsns.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/ext/sunpkcs11.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/lib/dt.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/lib/tools.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/rt.jar,/d01/oracle/DEV1/apps/apps_st/comn/java/lib/appsborg.zip,/d01/oracle/DEV1/apps/tech_st/10.1.2/forms/java,/d01/oracle/DEV1/apps/tech_st/10.1.2/forms/java/frmall.jar,/d01/oracle/DEV1/apps/tech_st/10.1.2/jlib/ewt3.jar,/d01/oracle/DEV1/apps/tech_st/10.1.2/j2ee/OC4J_BI_Forms/applications/formsapp/formsweb/WEB-INF/lib/frmsrv.jar,/d01/oracle/DEV1/apps/apps_st/comn/java/classes]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/fnd/common/VersionInfo.class]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/inv/utilities/server/UtilFns.class]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/beans/ButtonFieldBean.class]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/beans/PageBean.class]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/beans/TextFieldBean.class]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/eventmodel/AbortHandlerException.class]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/eventmodel/DefaultOnlyHandlerException.class]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/eventmodel/InterruptedHandlerException.class]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/eventmodel/MWAEvent.class]
/d01/oracle/DEV1/apps/apps_st/appl/xxc/12.0.0/java/CustomTestPage.java:27: cannot find symbol
symbol : class CustomTestFListener
location: package xxx.custom.server
import xxx.custom.server.CustomTestFListener;
^
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/beans/MWABean.class]
[loading java/io/Serializable.class(java/io:Serializable.class)]
[loading java/lang/Object.class(java/lang:Object.class)]
[checking xxx.custom.server.CustomTestPage]
[loading java/lang/String.class(java/lang:String.class)]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/beans/InputableFieldBean.class]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/beans/FieldBean.class]
/d01/oracle/DEV1/apps/apps_st/appl/xxc/12.0.0/java/CustomTestPage.java:113: cannot find symbol
symbol : class CustomTestFListener
location: class xxx.custom.server.CustomTestPage
CustomTestFListener fieldListener =
^
/d01/oracle/DEV1/apps/apps_st/appl/xxc/12.0.0/java/CustomTestPage.java:115: cannot find symbol
symbol : class CustomTestFListener
location: class xxx.custom.server.CustomTestPage
new CustomTestFListener();
^
[loading java/lang/Exception.class(java/lang:Exception.class)]
[loading java/lang/Throwable.class(java/lang:Throwable.class)]
[total 222ms]
3 errors
written by Phu Tri Nguyen , September 08, 2011
[search path for source files: /d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/lib/dt.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/lib/tools.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/rt.jar,/d01/oracle/DEV1/apps/apps_st/comn/java/lib/appsborg.zip,/d01/oracle/DEV1/apps/tech_st/10.1.2/forms/java,/d01/oracle/DEV1/apps/tech_st/10.1.2/forms/java/frmall.jar,/d01/oracle/DEV1/apps/tech_st/10.1.2/jlib/ewt3.jar,/d01/oracle/DEV1/apps/tech_st/10.1.2/j2ee/OC4J_BI_Forms/applications/formsapp/formsweb/WEB-INF/lib/frmsrv.jar,/d01/oracle/DEV1/apps/apps_st/comn/java/classes]
[search path for class files: /d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/resources.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/rt.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/sunrsasign.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/jsse.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/jce.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/charsets.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/classes,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/ext/sunjce_provider.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/ext/localedata.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/ext/dnsns.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/ext/sunpkcs11.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/lib/dt.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/lib/tools.jar,/d01/oracle/DEV1/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/rt.jar,/d01/oracle/DEV1/apps/apps_st/comn/java/lib/appsborg.zip,/d01/oracle/DEV1/apps/tech_st/10.1.2/forms/java,/d01/oracle/DEV1/apps/tech_st/10.1.2/forms/java/frmall.jar,/d01/oracle/DEV1/apps/tech_st/10.1.2/jlib/ewt3.jar,/d01/oracle/DEV1/apps/tech_st/10.1.2/j2ee/OC4J_BI_Forms/applications/formsapp/formsweb/WEB-INF/lib/frmsrv.jar,/d01/oracle/DEV1/apps/apps_st/comn/java/classes]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/inv/utilities/server/UtilFns.class]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/beans/FieldBean.class]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/container/Session.class]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/eventmodel/AbortHandlerException.class]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/eventmodel/DefaultOnlyHandlerException.class]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/eventmodel/InterruptedHandlerException.class]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/eventmodel/MWAEvent.class]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/eventmodel/MWAFieldListener.class]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/eventmodel/MWAListener.class]
[loading java/util/EventListener.class(java/util:EventListener.class)]
[loading java/lang/Object.class(java/lang:Object.class)]
/d01/oracle/DEV1/apps/apps_st/appl/xxc/12.0.0/java/CustomTestFListener.java:75: cannot find symbol
symbol : class CustomTestPage
location: class xxx.custom.server.CustomTestFListener
CustomTestPage pg;
^
[checking xxx.custom.server.CustomTestFListener]
[loading java/lang/Error.class(java/lang:Error.class)]
[loading java/lang/Exception.class(java/lang:Exception.class)]
[loading java/lang/Throwable.class(java/lang:Throwable.class)]
[loading java/lang/RuntimeException.class(java/lang:RuntimeException.class)]
[loading java/lang/String.class(java/lang:String.class)]
[loading java/util/EventObject.class(java/util:EventObject.class)]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/beans/MWABean.class]
/d01/oracle/DEV1/apps/apps_st/appl/xxc/12.0.0/java/CustomTestFListener.java:56: cannot find symbol
symbol : class CustomTestPage
location: class xxx.custom.server.CustomTestFListener
pg = (CustomTestPage)ses.getCurrentPage();
^
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/container/BaseSession.class]
[loading /d01/oracle/DEV1/apps/apps_st/comn/java/classes/oracle/apps/mwa/beans/PageBean.class]
[total 224ms]
2 errors
written by Phu Tri Nguyen , September 08, 2011
PhuTri
written by Phu Tri Nguyen , September 09, 2011
1) Copy all 3 Java Files to $JAVA_TOP/xxx/custom/server (/d01/oracle/DEV1/apps/apps_st/comn/java/classes/xxx/custom/server)
2) Set environment (the .env file)
3) Compile the java files from the uploaded directory (javac -classpath $JAVA_TOP *.java)
4) Register it in EBS as function (HTML Call: xxx.custom.server.CustomTestFunction)
5) Register it in Mobile responsibility
And that's it. Thank you very much for the articals and your posts.
PhuTri





f Prints. 
Thanks for the detailed description on creating a Test page. Senthil, I have one question, Iam new to MWA so if I want to know about the various classes that we use in creating and customising the pages, for example this statement
import oracle.apps.mwa.eventmodel.MWAEvent;
I want to know the functionality of the methods in this clase, is there any Developer guide or any doc that has detailed informtion like these. Kindly Please help me on this.
Thanks in Anticipation.
Amar