Skip to main content
1-Visitor
Oct 31, 2014 11:37 AM UTC
Solved

Windchill search customization

Hi! I want to customize OOTB search. But I can't find where the search component is stored (look the picture below):

Search.png

And may be somebody know good manuals about it?

mraneAnswer
1-Visitor
Nov 12, 2014 6:16 AM UTC

Hey Anton,

Main.js is a generated file. Most of the js code is written in jsfrag and all these jsfrags are combined into one big main.js file.

I think the kind of problem you are seeing is because the main.js is cached at some place. I wouldnt be able to tell you exactly where.

The function checkListenerForNormalTypes() appears in the following jsfrag file :

<WT_HOME>\codebase\netmarkets\javascript\util\jsfrags\search.jsfrag

You can try making changes here and then execute the following command to generate the latest main.js

Windchill/bin>ant -f jsfrag_combine.xml

By this you'll not run into the previous problem, I suppose. Also, you can find additional inforamation on Whindchill Help Center (Adding Custom Code to all Windchill Client Architecture Pages).


13 replies

1-Visitor
Nov 3, 2014 8:46 AM UTC

Hi Anton,

What part of the search page do you want to customize ? Do you wish to customize the look and feel of the search page ? Do let us know a few details and I'll be able to help better.

Not sure if this would help - The rendering code starts from the following jsp :

<WT_HOME>\codebase\netmarkets\jsp\search\commonSearch.jsp

-Malavika

Translate
1-Visitor
Nov 5, 2014 12:57 PM UTC

Hi Malavika!

I want to add some controls like checkboxes and handle them. So I need to know:

1) How to customize view of the page

2) How to handle data that was inserted in the search page.

Translate
1-Visitor
Nov 5, 2014 1:32 PM UTC

HI Anton,

The checkboxes that you can see for object types on the search page are rendered using EXT-JS API's. A datastore is set intially which is very similar to a JSON. The datastore is then consumed while rendering the checkboxes. The check/uncheck events have JS listeners that fire an ajax call to populate the querybuilder with type specific attributes. All this is done using EXT-JS. For reference you may check the following files and JS functions:

1. <WT_HOME>\codebase\netmarkets\jsp\search\pickerTypeChooser.jsp

2. In main.js check - function setupJSONDataSource() , function displayTypePickerCheckBox()

Ofcourse, all the above is about how the checkboxes are rendered on the search page. I am not sure how far it will help you. Let me know if you have any specific questions as to the existing manner in which things are done on the search page.

Translate