To extend a search or detail screen in the Applications
Manager:
Procedure
From the Applications Manager, navigate to the screen that you
want to extend.
After the screen loads, press CTRL-M,
which displays the window with the Form Name (which is the resource
ID for the screen), the Form Class name, and XML data information.
Note the Form Name (resource ID) and Form Class Name.
The install_dir/xapidocs/code_examples/configuisrc/smcfsuisrc.jar
file contains the source code corresponding to all Form classes for Sterling Selling and
Fulfillment Foundation.
There is a corresponding .form file and a .java file. The .form file
is used by NetBeans and is required only if you use the NetBeans 3.2
IDE.
Copy the .java and .form files corresponding to the Form
Class Name that you had noted into your own directory structure. The
copy you make should have a different class name. Make sure you do
not copy it anywhere under com.yantra because that is reserved strictly
for products of Sterling Selling and Fulfillment
Foundation.
Add the following JAR files to the CLASSPATH. This can
be done in NetBeans 3.2 by mounting the JAR file.
jgo.jar
platui.jar
ycmui.jar
xercesImpl.jar
You need to do this in order to compile the Java™ file.
Add the package name to the top of the form. Put the appropriate
class name in the code (should be the same Java class that you originally copied as the
file name created in step 5).
The copied Java class must extend the original.
Set the Variables Modifier option in Net Beans to public.
The default value is private. This option can usually
be found in Tools > Options > Form Objects > Expert Tab.
Remove super.init() from the init() function.
At the end of the init() function, add the following line:
checkVars();
Make the necessary changes to the new form. To set the
properties of the new controls, see the XML Binding table in XML binding in the swing user interface.
Only the following changes are permitted:
Rearranging any components on the user interface
Hiding any non-mandatory components
Adding any buttons and labels
Adding any text fields and checkboxes
Compile the .java file, create a JAR file named yfsextn.jar
that contains only the .class file, and put it in the install_dir/extensions/global/webpages/yfscommon/
directory.
Copy the file install_dir/repository/eardata/smcfs/war/yfscommon/jarlist.txt
to install_dir/extensions/global/webpages/yfscommon/jarlist.txt
and edit this copied file to enter the name of the newly added yfsextn.jar
file.
Rename the install_dir/repository/xapi/template/merged/configresource/extn_application.xml.sample
file to "extn_application.xml".
Edit the extn_application.xml file to include the Form
Name (the resource ID that you noted in step 3) and the Override Form
Class Name (the complete path of the new class name that overrides
the existing application class).