Troubleshooting
Problem
Customizing/extending Yantra Configurator for Item Detail screen
Symptom
Customizing/extending Yantra Configurator for Item Detail screen to add a check box
Cause
Resolving The Problem
The steps which are missing in the documentation are an addition to be made to
Point 14 :
Where in the extn_application.xml file is to be placed in
<YFS_HOME>/template/configapi/extn and changes are to be made to this xml as
well.
14. Copy the
<YFS_HOME>/template/configapi/extn_application.xml.sample file into the
<YFS_HOME>/template/configapi/extn and <YFS_HOME>/extn directory and rename it
"extn_application.xml".
15. Edit the extn_application.xml file( in both the
places) 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
will override the existing Yantra 7x class).
Enumerating all the
steps:
-----------------------------------------
The Yantra 7x
Configurator screens are defined in an XML file. This file
contains the
unique screen ID, Form Class, and Behavior Class for each
screen. This file
must be extended in order to extract the Yantra 7x
Configurator screens as
described in the following steps:
To extend a search or detail screen:
1.
From the Yantra 7x Configurator, navigate to the screen that you
want to
extend.
2. 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.
3. Note the Form Name
(resource ID) and Form Class Name.
4. The <YFS_HOME>/lib/yantrauisrc.jar
file contains the source code corresponding to all Form classes. 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.
5. 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 Yantra 7x products.
6. Add the following JAR
files to the CLASSPATH. This can be done in NetBeans 3.2 by mounting the JAR
file.
1> jgo.jar
2> ycpui.jar
3> ycmui.jar
4> yifui.jar
5>
yfcui.jar
6> xerces.jar
Swing User Interface Extensibility Customizing
the Configurator Swing Interface 4-5
You need to do this in order to compile
the Java file.
7. 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.
8. 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.
9. Remove
super.init() from the init() function.
10. At the end of the init()
function, add the following line:
checkVars();
11. Make the necessary
changes to the new form. To set the properties of
the new controls, see
Table 4-1, "XML Binding".(XML binding to be followed as in documentation) Only
the following
changes are permitted:
a> Rearranging any components on the
user interface
b> Hiding any non-mandatory components
c> Adding any
buttons and labels
d> Adding any text fields and checkboxes
12. Compile
the .java file, create a JAR file that contains only the .class file, and put
it in the <YFS_HOME>/extn/ui/ directory and
the
<YFS_HOME>/webpages/yfscommon/ directory. The JAR file name should be
yfsextn.jar.
13. Make an entry in <YFS_HOME>/webpages/yfscommon/jarlist.txt
for the newly added JAR file: yfsextn.jar.
14. Copy the
<YFS_HOME>/template/configapi/extn_application.xml.sample file into the
<YFS_HOME>/template/configapi/extn and <YFS_HOME>/extn directory and rename it
"extn_application.xml".
15. Edit the extn_application.xml file( in both the
places) 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
will override the existing Yantra 7x class).
16. From the <YFS_HOME>
directory, run the following script, which creates an application EAR
file:
Swing User Interface Extensibility 4-6 Customization Guide
ant
-buildfile bin/buildXX.xml ui-extn create-ear,
where XX represents either
WLS or WS
Historical Number
PRI49656
Product Synonym
[<p><b>]Fact[</b><p>];
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21528698