Select to view content in your preferred language

eSearch widget customization

3884
16
Jump to solution
02-04-2016 12:21 PM
RudoDuncan
Deactivated User

Robert Scheitlin, GISP

Ok I changed the code where every instance was esearch and made it cfssearch. I have a widget folder called 'cfsSearch)

Issue 1: I get an error when I try to open the widget after I have made it button 1.

Capture.JPG

Issue 2: When I add the widget a different button position it works.

Capture3.JPGCapture2.JPG

Issue 3:

I typed in over 500 Radio codes in the predefined option for the Radio Code field and the Final Radio Code field has the same values. I went to the config.json and copied the values to the Final Radio Code values and saved. When I then tried testing it it did not work. It seems like my biggest problem is finding the cfsSearch widget folder. Something is not getting read, do you have any ideas on how to make it find the widget folder and add my modifications to the widget?

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Rudo,

  So the issue was in the CaSe of cfsSearch in many of the files where is was looking for the path of a fiel you had cfssearch (all lower case) which was not a valid path as JS is case sensitive. No all the locations where you had cfssearch for a css class name or css rule that was fine because convention is that class names are all lower case. So with a little tweaking it now works fine (as far as adding the widget without error). I could not test your layer obviously as it is a local url to your machine and not a public url. I did remove the blanks you inserted in the uselists as there is code in the widget to do this if the field is not marked as required.

Just FYI, you have 7 other posts out there about the eSearch that I have answered and you have not marked as answered.

And is there a particular reason you are still using 1.2?... Each new release the fix bugs and the product gets better. It will always be in your best interest to keep up to date.

View solution in original post

16 Replies
RobertScheitlin__GISP
MVP Emeritus

Rudo,

   Have you tried to look in your browsers web console to see if the error(s) there give you a clue on what is going wrong?

0 Kudos
RudoDuncan
Deactivated User

This is what I got.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Rudo,

   What that tells me is that you missed changing the name of the widget from eSearch to cfsSearch in one of the files (either .js or .html).

RudoDuncan
Deactivated User

Is it possible for me to zip my widget to you and you take a look?

0 Kudos
RudoDuncan
Deactivated User

it works sometimes but does not reflect my new changes to the config.json. It's weird. Sorry and I appreciate your patience with this.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Sure zip it and send it. As far as the changes to the config.json. You are aware that the config.json in the widget folder is not the file that is used once the widget has been added to an app right? The json file you are wanting to modify is in [install dir]/server/apps/[app #]/configs/cfsSearch/config_xxxxx.json

0 Kudos
RudoDuncan
Deactivated User

Yes, there's a configs folder that says eSearch however its had the config_CFS Search.json.

Then copied and renamed it to config.json and added to my cfsSearchWidget folder and made some other changes to the file.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Rudo,

  So the issue was in the CaSe of cfsSearch in many of the files where is was looking for the path of a fiel you had cfssearch (all lower case) which was not a valid path as JS is case sensitive. No all the locations where you had cfssearch for a css class name or css rule that was fine because convention is that class names are all lower case. So with a little tweaking it now works fine (as far as adding the widget without error). I could not test your layer obviously as it is a local url to your machine and not a public url. I did remove the blanks you inserted in the uselists as there is code in the widget to do this if the field is not marked as required.

Just FYI, you have 7 other posts out there about the eSearch that I have answered and you have not marked as answered.

And is there a particular reason you are still using 1.2?... Each new release the fix bugs and the product gets better. It will always be in your best interest to keep up to date.

RudoDuncan
Deactivated User

I honesty thought I was using the latest file from January. Also, I will go back and mark my threads as answered. I will test it today, thank you again for all your help.

0 Kudos