How to customize navigationRB.java?
‎May 16, 2013
12:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎May 16, 2013
12:20 PM
How to customize navigationRB.java?
Windchill 10.1 M040
I am attempting to customize the "Quick Links" menu by adding a new submenu (similar to the Help or
"My Settings" submenus). I have successfully added the new submenu and several items under the
submenu by editing custom-actionModels.xml and custom-actions.xml in codebase/config/actions.
My problem is my new submenu title is blank. Apparently one needs to customize
src/com/ptc/core/ui/navigationRB.java in order to simply title a menu.
I have modified this file but now have 2 questions:
1. What directory should the modified navigationRB.java be located in?
* ie in 9.1 customized rbInfo files were placed in wtCustom
* example wtCustom/wt/lifecycle/StateRB.rbInfo
2. How do I compile this customized java file?
* in 9.1 I would use "ant -f ./bin/tools.xml bundle_custom -Dbundle.input=registry"
I have scoured the Customization Guide for several hours but apparently must be missing something
obvious.
--
I am attempting to customize the "Quick Links" menu by adding a new submenu (similar to the Help or
"My Settings" submenus). I have successfully added the new submenu and several items under the
submenu by editing custom-actionModels.xml and custom-actions.xml in codebase/config/actions.
My problem is my new submenu title is blank. Apparently one needs to customize
src/com/ptc/core/ui/navigationRB.java in order to simply title a menu.
I have modified this file but now have 2 questions:
1. What directory should the modified navigationRB.java be located in?
* ie in 9.1 customized rbInfo files were placed in wtCustom
* example wtCustom/wt/lifecycle/StateRB.rbInfo
2. How do I compile this customized java file?
* in 9.1 I would use "ant -f ./bin/tools.xml bundle_custom -Dbundle.input=registry"
I have scoured the Customization Guide for several hours but apparently must be missing something
obvious.
--
Labels:
- Labels:
-
Other
3 REPLIES 3
‎May 16, 2013
01:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎May 16, 2013
01:14 PM
You need to keep it under the current directory...the one beginning with src/
This file has to be compiled into a .class file with the javac compiler and placed under codebase/com/ptc...so on. Essentially swapping codebase in path where src is.
Sent from my Verizon Wireless 4G LTE Smartphone
This file has to be compiled into a .class file with the javac compiler and placed under codebase/com/ptc...so on. Essentially swapping codebase in path where src is.
Sent from my Verizon Wireless 4G LTE Smartphone
‎May 16, 2013
02:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎May 16, 2013
02:13 PM
Make sure to use the wtSafe area for modifications to codebase files.
Patrick Williams | Engineering Systems | c: 616.947.2110
[cid:image001.jpg@01CE523F.8A581A10]
Patrick Williams | Engineering Systems | c: 616.947.2110
[cid:image001.jpg@01CE523F.8A581A10]
‎May 17, 2013
04:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎May 17, 2013
04:58 PM
It turns out there really isn't a "Windchill 10.1 way" to answer my 2 questions. I was assuming
there would be something like the enumCustomize and "ant -f ./bin/tools.xml bundle_custom
-Dbundle.input=registry"to accomplishthis.
Instead one simply needs to create a new java class in your development environment (ie inan Eclipse
workspace)using navigationRB.java as an example. Then simply compile and place the class file or jar
file as appropriate.
This is actually better than the old rbInfo files because you are not modifying OOTB files.
A screenshot of my "GPMFG JSP Utilities" custom menu:
Customized Quick Links menu
The steps I took to customize the Quick Links menu and add my custom menu was this:
1. set preference "Client Customization" to yes in order to show Customization in the UI (under
Navigator | Browse)
2. created a new java class; I choose com.greatplainsmfg.windchill.ActionDefinitionsRB as the name
* source code is attached
* I used navigationRB.java as an example
3. Copied the jar file, that includes this java class, to Windchill/lib and
Windchill/codebase/WEB-INF/lib
4. restarted Windchill
5. modified codebase/config/actions/custom-actionModels.xml
* attached
* copied the "header actions" model (which defines the Quick Links menu) from
navigation-actionModels.xml into this file
* modified to add my submenu
* Note the resourceBundle="com.greatplainsmfg.windchill.ActionDefinitionsRB" for my
gpmfgJSPUtils model
6. modified codebase/config/actions/custom-actions.xml
* attached
* This defines the items in the submenu
7. Selected "Reload Actions(s)" from Customization | Tools
8. Reloaded the browser page and Success!!
* Well actually it took many iterations of other steps before getting "Success"...
Thanks to all responded.
there would be something like the enumCustomize and "ant -f ./bin/tools.xml bundle_custom
-Dbundle.input=registry"to accomplishthis.
Instead one simply needs to create a new java class in your development environment (ie inan Eclipse
workspace)using navigationRB.java as an example. Then simply compile and place the class file or jar
file as appropriate.
This is actually better than the old rbInfo files because you are not modifying OOTB files.
A screenshot of my "GPMFG JSP Utilities" custom menu:
Customized Quick Links menu
The steps I took to customize the Quick Links menu and add my custom menu was this:
1. set preference "Client Customization" to yes in order to show Customization in the UI (under
Navigator | Browse)
2. created a new java class; I choose com.greatplainsmfg.windchill.ActionDefinitionsRB as the name
* source code is attached
* I used navigationRB.java as an example
3. Copied the jar file, that includes this java class, to Windchill/lib and
Windchill/codebase/WEB-INF/lib
4. restarted Windchill
5. modified codebase/config/actions/custom-actionModels.xml
* attached
* copied the "header actions" model (which defines the Quick Links menu) from
navigation-actionModels.xml into this file
* modified to add my submenu
* Note the resourceBundle="com.greatplainsmfg.windchill.ActionDefinitionsRB" for my
gpmfgJSPUtils model
6. modified codebase/config/actions/custom-actions.xml
* attached
* This defines the items in the submenu
7. Selected "Reload Actions(s)" from Customization | Tools
8. Reloaded the browser page and Success!!
* Well actually it took many iterations of other steps before getting "Success"...
Thanks to all responded.