Select to view content in your preferred language

Enhanced-Search-Widget-for-FlexViewer Part II

113093
552
04-19-2012 08:03 AM
RobertScheitlin__GISP
MVP Emeritus
All,

   I am pleased to announce the next release of my eSearch Widget.

http://www.arcgis.com/home/item.html?id=5d4995ccdb99429185dfd8d8fb2a513e

Version 2.5.1.7 - 4/19/2012
* Added ability to search (flat/standalone/no geometry) tables.
* This time all Zooming uses the same scaling (popup, datagrid, widget results, zoom to all).
* Added Relates icon/button to datagrids so that you can click on it in the datagrid to
  open relates choice dialog.
* Move all skins to a skins package for cleaner organization.
* Links that are not associated with a field now work.
* Ability to disable the relates tab in the fixed widget is now configurable.
552 Replies
RobertScheitlin__GISP
MVP Emeritus
Lixin,

   Got it, that will make it into the next version.
0 Kudos
LixinHuang
Regular Contributor
Robert,

Thanks for your quick reply. I am looking forward to your next release.
0 Kudos
glennhazelton
Deactivated User
hi Robert,
some time ago i asked you for help in formating a date field in the esearch widget. below is what you provided. it works but i am getting odd results.
what is occuring is that the dates shown in the datagrid are 24 hrs older that the dates shown in arccatalog or sql+.
so i see 5/9/2012 8pm in the esearch datagrid and 5/10/2012 8pm in sql+.
i have tryed changing the 'useutc' tag to 'false' and removing it altogether but the displayed results are still the same.
do you have ideas about what could be happening? i have attached a screen shot as well.

here is the line from the esearch config.
<field name="DATE_COLLECTED" dateformat="MM/DD/YYYY  L A" useutc="true" gridfield="true"/
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Glen,

   What version and service pack of ArcGIS Server are you running?
0 Kudos
JaneCopeland
Deactivated User
Robert,

When I run this widget from the Esri site the pop-up windows persist after I change navigation tools through the navigation toolbar. When I run it from my own site, without modification, I loose the pop-ups. Am I missing a setting someplace that would allow the pop-ups to persist?

Thanks.

Jane
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jane,

   I can not duplicate the behavior you are seeing even on a fresh clean install of the eSearch. When I have a popup visible and then switch navigation tools the popup remains.
0 Kudos
glennhazelton
Deactivated User
Glen,

   What version and service pack of ArcGIS Server are you running?


Robert,
i am running Arcserver 10 with sp4 installed.

it is clear now that what is happening is that Flex is subtracting 5 hrs from the time stored in the DB.
the time in the DB is EST or EDT not  GMT.
i have tryed a few tags that i found in the flex help (z=EST) or (zzz=GMT-00500)
but nothing seem to work make a difference.
i am seeing the same results with the Pop-up box as well.

http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/globalization/DateTime...
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Glenn,

Here is the code in my widget and all esri widgets as well that converts the date returned from REST (which is converted to utc before returned):

            private function msToDate(ms:Number, dateFormat:String, useUTC:Boolean):String
            {
                var date:Date = new Date(ms);
                if (date.milliseconds == 999) // workaround for REST bug
                    date.milliseconds++;
                if (useUTC)
                    date.minutes += date.timezoneOffset;
                
                if (dateFormat){
                    dateFormatter.formatString = dateFormat;
                    var result:String = dateFormatter.format(date);
                    if (result)
                        return result;
                    else
                        return dateFormatter.error;
                }else{
                    return date.toLocaleString();
                }
            }
0 Kudos
glennhazelton
Deactivated User
So Robert, i could use a bit more explaination--
does this code mean that if i have the tag useUTC='true' then i should be getting the time corrected to my timezone.?
how does it know what my timezone is? is it looking at the time on the webserver?
and
if i dont use the tag then i would get UTC time?
here is my config line.
it doesnt seem to matter if i have the useUTC in it or not. i see the same results regardless.
<field name="THE_DATE" dateformat="MM/DD/YYYY  L A" useUTC="true" gridfield="true"/> 


Glenn,

Here is the code in my widget and all esri widgets as well that converts the date returned from REST (which is converted to utc before returned):

            private function msToDate(ms:Number, dateFormat:String, useUTC:Boolean):String
            {
                var date:Date = new Date(ms);
                if (date.milliseconds == 999) // workaround for REST bug
                    date.milliseconds++;
                if (useUTC)
                    date.minutes += date.timezoneOffset;
                
                if (dateFormat){
                    dateFormatter.formatString = dateFormat;
                    var result:String = dateFormatter.format(date);
                    if (result)
                        return result;
                    else
                        return dateFormatter.error;
                }else{
                    return date.toLocaleString();
                }
            }
0 Kudos
JaneCopeland
Deactivated User
Robert,

Is there some setting in some other part of the viewer that keeps the mouse active on the map even after the navigation tool is used?

Jane
0 Kudos