Select to view content in your preferred language

customization of esearch widget

3760
9
05-16-2016 04:06 AM
deepthip
New Contributor

hi,

I am trying to customize the esearch widget according to my requirement

1. can i know how to add a confirm button in the results prompt in the esearch widget. so that when the confirm button is clicked the result set should be saved in the service that is used.

2. what files need to be edited in the esearch.zip for the above mentioned requirement?

0 Kudos
9 Replies
RobertScheitlin__GISP
MVP Emeritus

Deepthi,

  I am not sure I understand your question.

so that when the confirm button is clicked the result set should be saved in the service that is used

Are you saying that your layer will be a FeatureServer (that allows editing) and you want to save the results as new features in the FeatureServer service layer?...

0 Kudos
deepthip
New Contributor

yes, i need to save the fields of the result in the feature service server database

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Deepthi,

  I am not sure I can help with this. Have you searched the JS API forums on adding features using FeatureLayer.applyEdits method?

0 Kudos
deepthip
New Contributor

no, can i get the link for that to refer

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Deepthi,

  Here is the JS API documentation link for that method:

FeatureLayer | API Reference | ArcGIS API for JavaScript | applyEdits

deepthip
New Contributor

can u let me know what files of the esearch.zip folder need to edited to get the button functionality done

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Uday,

    The file would be the Widget.js and probably the _drawResults function.

0 Kudos
deepthip
New Contributor

Am new to arcgis.. Can u tell the flow of execution(starting from which file it starts and next through which file it continues) of the eSearch widget  if u can. Thanks in Advance.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Deepthi,

  You may be in over your head. The eSearch is a complex widget with many code paths and customizable features which make the code even more complex. The Widget.js is over 2800 lines of code, it would not be practical from me to explain the flow of the widget, but the basics are:

When the user does a by value search the search button is clicked and the onSearch function is called. The onSearch method calls the search function which calls the _onSearchFinish function, which calls the _drawResults function.

0 Kudos