POST
|
Hi Anthony, I have changed the widgetTemplate id to wTemplate, the surprise thing is the result is opposite to expected. When load the map service, although the widget not displayed in the widget group, the widget display on map. When I load in another widget, it not appear. I set wTemplate.widgetState = "closed" in init() should means when other widget load this widget, it widget is closed right? Thanks you.
... View more
11-20-2014
01:47 AM
|
0
|
1
|
654
|
POST
|
Hi Anthony, Yes I am using standard widget template. I cannot find wTemplate because I changed the widgetTemplate id. I put the following in config.xml UI elements: <widget left="10" top="10" config="widgets/MyService/AttributeSearch/AttributeSearch.xml" url="widgets/MyService/AttributeSearch/AttributeSearch.swf"/> May I confirm the this.wTemplate.widgetState = "closed" is added in the widget which I want to hide from the group right? I only have init() in the mxml, not basewidget_widgetConfigLoaded() there. Thanks a lot for the patient.
... View more
11-20-2014
12:52 AM
|
0
|
3
|
654
|
POST
|
Hi Robert, It is select by attribute, I found Mark Hoyland's sample which based on your eSearch. function onSelectItem(e:ContextMenuEvent):void{ if(datagrid.selectedIndex >= 0){ "selected Item No = " + datagrid.selectedItem.itemNo); "selected Item Sub No = " + datagrid.selectedItem.itemSubNo); this.cursorManager.setBusyCursor(); var query:Query = new Query; query.where = "SELECT * from dev_db.DBO.ItemDetails WHERE Item_No = '" + datagrid.selectedItem.itemNo + "' and Sub_No = '" + datagrid.selectedItem.itemSubNo + "'"; new AsyncResponder(onSelectResult, onSelectFault, targetLayer)); else{ "Select a record first","ATTENTION"); } } private function onSelectResult(info:Array, token:FeatureLayer = null😞void { this.cursorManager.removeBusyCursor(); var fl:FeatureLayer = token; if (fl.selectedFeatures.length == 0) "Selection completed but found no features. Please check your parameters." , "Nothing Found", Alert.OK); } private function onSelectFault(info:Object, token:Object = null😞void { this.cursorManager.removeBusyCursor(); "Could not complete Selection. Please try again.\n" + info.toString(), "Selection Error", Alert.OK); } All features are in the layer dev_db.DBO.ItemDetails, but never select the feature and the busy icon there. Thanks a lot for the patient and attention.
... View more
11-19-2014
10:04 PM
|
0
|
16
|
997
|
POST
|
Hi Robert, I missing importing ViewerContainer, after importing it, it works as expected, thank you so much.
... View more
11-19-2014
06:42 PM
|
0
|
0
|
464
|
POST
|
Hi Robert, You are right, by using the updated code the problem not occur again. Thanks a lot.
... View more
11-19-2014
06:26 PM
|
0
|
0
|
408
|
POST
|
Hi Robert, The widget group listed in the config.xml is as follows: <widgetgroup icon="assets/images/WidgetGroup.png" label="Map Services"> <widget label="Turn On/Off Map Service" icon="assets/images/turnOnOff.png" config="widgets/MapService/TurnOnOff/TurnOnOff.xml" url="widgets/MapService/TurnOnOff/TurnOnOff.swf"/> <widget label="Attribute Search" icon="assets/images/i_search.png" config="widgets/MapService/AttributeSearch/AttributeSearch.xml" url="widgets/MapService/AttributeSearch/AttributeSearch.swf"/> <widget label="Attribute Search Results" icon="assets/images/i_search.png" config="widgets/MapService/AttributeSearchResults/AttributeSearchResults.xml" url="widgets/MapService/AttributeSearchResults/AttributeSearchResults.swf"/> </widgetgroup> Thanks a lot.
... View more
11-19-2014
05:07 PM
|
0
|
2
|
464
|
POST
|
Hi Anthony, I am using "Building Automatically". Another thing to check is by this option, if the widget is not displayed in the widget group, can it opened by another widget? Since I need to open it by widgetId. Thanks a lot.
... View more
11-19-2014
01:59 AM
|
0
|
5
|
654
|
POST
|
Hi Anthony, Thanks a lot for the reply. When I tried to add this.wTemplate.widgetState = "closed"; into the init() function of the widget, I got an error which indicate wTemplate is undefined, have I missed something? Thanks.
... View more
11-19-2014
01:26 AM
|
0
|
7
|
654
|
POST
|
Dear all, In my flex application, I have a function to retrieve feature attributes in a datagrid. In the datagrid, I add a context menu "Select and Zoom", when click this context menu on a selected row, I need to select and zoom to the feature based on the "Item No" and "Item Sub No" value. The feature layer is a polyline layer. I tried to find a solution from ESRI smaple, but no luck. Could anybody please give me help on this? Thanks a lot. I am using Adobe Flash Builder 4.6 and arcgis api for flex 3.6.
... View more
11-19-2014
12:20 AM
|
0
|
18
|
4491
|
POST
|
Dear all, I have 3 widgets in a widget group: But I only want the first 2 widgets displayed in the widget group. The "Attribute Search Results" widget supposed to be open only when a button in "Attribute Search" is clicked. I guess it should be set in config.xml, but I don't know how to set it. I am using Adobe Flash Builder 4.6 and ArcGIS API for flex 3.6. Thanks in advance.
... View more
11-18-2014
07:30 PM
|
0
|
13
|
3219
|
POST
|
Hi Robert, I am asking the customized Flex API code. Should I use WidgetTemplate instead of application. Sorry for so many questions because I am just starting using Flex. Thanks a lot for the help.
... View more
11-18-2014
05:19 PM
|
0
|
2
|
408
|
POST
|
Thank you very much Robert, unfortunately by using getWidgetId, no error but no response. May I confirm the title of widget refers to the title "Attribute Search" in the below picture? I try different numbers instead of widgetId, it works, but still want to why getWidgetId not working. Thanks a lot!
... View more
11-18-2014
05:17 PM
|
0
|
4
|
464
|
POST
|
Hi all, I have a flex widget, after click a button the widget will be hidden and another widget will be loaded. But after that even I click on the widget in the menu, the widget will not appear. The code for hide the widget is as follows: query.visible = false What should I do for enable the visibility of the widget? I am using arcgis api for flex 3.6. Thanks a lot!
... View more
11-17-2014
11:50 PM
|
0
|
6
|
2098
|
POST
|
Hello everybody, I am using adobe flash builder to create a widget. The widget should load a datagrid with the data retrieved by ASP.NET, but when I click the widget, it keeps loading. My code is as the following: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()"> <mx:Script> <![CDATA[ import mx.controls.Alert; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; public function init():void { // Get Data from WebService and fill datagrid when you first invoke the application ws.GetLoc(); } public function GetLoc(event:ResultEvent):void { // Databind data from webservice to datagrid datagrid.dataProvider = event.result; } public function fault(event:FaultEvent):void { // Oppps some error occured Alert.show(event.toString()); } ]]> </mx:Script> <mx:WebService id="ws" wsdl="http://localhost/TestWebService/Service.asmx?WSDL" fault="fault(event)"> <mx:operation name="GetLoc" resultFormat="object" result="GetLoc(event)" /> </mx:WebService> <mx:Panel x="41.5" y="66" width="714.5" height="237" layout="absolute" title="Results"> <mx:HBox height="95%" width="95%" horizontalCenter="0" verticalCenter="0"> <mx:DataGrid id="datagrid" width="680" height="100%"> <mx:columns> <mx:DataGridColumn headerText="Item No" dataField="ItemNo"/> <mx:DataGridColumn headerText="Sub Type No" dataField="SubTypeNo"/> <mx:DataGridColumn headerText="Item Name" dataField="ItemName"/> <mx:DataGridColumn headerText="Arrival Date" dataField="ArrivalDate"/> </mx:columns> </mx:DataGrid> </mx:HBox> </mx:Panel> </mx:Application> No idea on it, is there anything wrong with my code? I am using Adobe flash builder 4.6 Thanks a lot. Message was edited by: Robert Scheitlin, GISP
... View more
11-17-2014
05:44 PM
|
0
|
4
|
2972
|
POST
|
Hi AI Pascual, Yes, it is a service layer. The red line in the following picture is the wrong location. Thanks a lot.
... View more
11-04-2014
06:13 PM
|
1
|
0
|
352
|
Title | Kudos | Posted |
---|---|---|
1 | 06-08-2014 07:03 PM | |
1 | 11-04-2014 06:13 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|