POST
|
Robert - That's got it. The shared data message works now with the initial click (along with opening the Request widget), subsequent clicks, and after closing/re-opening the Request widget. Cannot thank you enough! My next/final step will be to pass the board information from the alert into the actual Request widget form and, when the user clicks the "Submit Request" button, the email message. I'm working on that now. Again, thank you so much! Joe
... View more
08-06-2012
12:01 PM
|
0
|
0
|
308
|
POST
|
Robert - I've gotten it to work, at least on the first click. When I replaced the Request widget mxml file with the one you sent I also had to re-specify the Flex Module for the Request widget. When I did that, the message appeared on the first "Add to Favorites" click event. Now, however, it's not continuing to work with subsequent clicks. In other words, the shared data message only appears when the Request widget has been opened with the first "Add to Favorites" click. Is there a separate var I need to add to the addToFavs_clickHandler function to have the shared data message appear on subsequent clicks/after the Request widget has been opened? This is looking very good! Thank you! Joe
... View more
08-06-2012
11:28 AM
|
0
|
0
|
308
|
POST
|
Robert - Understood and agreed. I'll work with the code you provided and see if I can get it to work in our current build. Thanks, again, for all your help! Joe
... View more
08-06-2012
09:55 AM
|
0
|
0
|
308
|
POST
|
The pre-release of 3.0. We had so much custom code, the owner decided that, rather than have me complete the migration to the final release now, we would wait and do it after the site is live. Thank you! Joe
... View more
08-06-2012
09:34 AM
|
0
|
0
|
308
|
POST
|
Robert - Line 42 in the Request widget contains just the close bracket for the sharedDataUpdated function: private function sharedDataUpdated(event:AppEvent):void [INDENT]{ if (data.key == "Board_Data") { if (data.collection[0]){ add2favs(data.collection[0]); } } }[/INDENT] //The line directly above with the close bracket is line 42 Understood about the location of where the shared data come in; I'll work on that now. Thank you! Joe
... View more
08-06-2012
08:38 AM
|
0
|
0
|
448
|
POST
|
Robert - I integrated your recommended code into my project and did not get any errors when compiling. However, when I tested the "Add to Favorites" button to add the board data into the Request widget, I got the error message below. Any suggestions? Also, thank you for designing the function to populate the data for the favorites into the Request widget. What part of the widget would the data go? Into the Billboards box? That's what my ultimate goal would be, so that the user could see the favorites before clicking submit. Again, thanks so much! Joe TypeError: Error #1009: Cannot access a property or method of a null object reference. at widgets.Request::RequestWidget/sharedData() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at com.esri.viewer::AppEvent$/dispatch() at com.esri.viewer.customskins::PopUpRendererSkin/addSharedData() at com.esri.viewer.customskins::PopUpRendererSkin/addToFavs_clickHandler() at com.esri.viewer.customskins::PopUpRendererSkin/__addToFavsButton_click()
... View more
08-06-2012
07:58 AM
|
0
|
0
|
448
|
POST
|
Robert - Once again, I cannot thank you enough. I'll integrate your changes into my code and go over your comments so that I can see how you did it. Truly, thank you! Joe
... View more
08-06-2012
02:45 AM
|
0
|
0
|
448
|
POST
|
Robert - Sounds great. Here's the Request widget and the PopUpRendererSkin mxml files (attached). Also, in the code segments I posted yesterday for the Request widget, I used the mailme function in the sharedDataUpdated functions. As I'm thinking about it, I'm going to want to develop a separate function to load the shared data from the PopUpRendererSkin into the Request widget form. This will give the user an opportunity to see all of the data (favorites) he/she has selected before clicking the Request widget form's submit button. Again, thanks so much for all of your help! This is the last piece before the map application goes live. Speaking of which, would it help to see the test version of the full map application? It can be accessed at: www.carteroutdoor.com/carterwebmap Thank you! Joe
... View more
08-05-2012
03:18 AM
|
0
|
0
|
448
|
POST
|
Robert - Once again, thank you very much for your input and guidance. I'm working with ESRI's SDK team on this issue but haven't been getting nearly the immediate response/direction that you've provided. I've made the following changes based on your comments. As you look at these, please keep in mind that I'm 1. Very (!) new to Flex development 2. Trying to work from your previous posts along with code recommendations from ESRI Also, the "mailme" function is still under development but I've added that function to the sharedDataUpdated and sharedDataUpdated2 functions. Obviously, I'm still struggling. REQUEST WIDGET CODE: private function widgetConfigLoaded(event:AppEvent):void { AppEvent.addListener(AppEvent.DATA_PUBLISH, sharedDataUpdated); AppEvent.addListener(AppEvent.DATA_SENT, sharedDataUpdated2); fetchSharedData(); } private function sharedDataUpdated(event:AppEvent):void { if (data.key == "Board_Data") { if (data.collection[0]){ mailme(); } } } private function sharedDataUpdated2(event:AppEvent):void { var dataTable:Hashtable = event.data as Hashtable; if (dataTable.containsKey("Board_Data")) { var recAC:ArrayCollection = dataTable.find("Board_Data") as ArrayCollection; if (recAC[0]){ mailme(); } } } private function mailme():void { var u:String = ""; u+= "mailto:cartapisana@gmail.com"; u+= "?"; u+= "subject="; u+= "Board Request from " + emailSubject.text; u+= " "; u+= "&body=Request Submitted By:" + "%0D%0A" + "%0D%0A" + "Name: " + emailName.text + "%0D%0A" + "Company: " + emailSubject.text + "%0D%0A" + "Phone: " + emailPhone.text + "%0D%0A" + "Email: " + emailEmail.text + "%0D%0A" + "%0D%0A" + "Contact Me: " + contactBox.selected + "%0D%0A" + "%0D%0A" + "Comments: " + "%0D%0A" + "%0D%0A" + emailComment.text + "%0D%0A" + "%0D%0A" + "Billboards:" + "%0D%0A + %0D%0A" + emailBillboards.text + "%0D%0A" + "%0D%0A" }
... View more
08-04-2012
02:40 PM
|
0
|
0
|
448
|
POST
|
I'm trying to get a custom addToFavs ("Add to Favorites") button in the PopUpRendererSkin to send data into the custom RequestWidget. Any assistance would be greatly appreciated! Joe CODE SEGMENTS Here's the code from the PopUpRendererSkin. The code to initialize the Request widget is working but I'm getting a "Call to a possibly undefined method" message on the "addSharedData" line. private function addToFavs_clickHandler(event:MouseEvent):void { [INDENT]var msArr:ArrayCollection = new ArrayCollection(); msArr.addItem("Board Name"); msArr.addItem("Location"); msArr.addItem("Street Side"); msArr.addItem("Facing"); addSharedData("MiniSearch_Search", msArr) //The code to initialize the Request widget if needed AppEvent.dispatch(AppEvent.WIDGET_RUN,ViewerContainer.getInstance().widgetManager.getWidgetId("Request Board Information"));[/INDENT] } Here's the code from the Request widget. I'm not getting any errors on this code but of course cannot test it until I'm able to send the data from the PopUpRendererSkin. protected function PopUpRendererSkin_initializeHandler(event:FlexEvent):void { [INDENT]AppEvent.addListener(AppEvent.DATA_PUBLISH, sharedData); AppEvent.addListener(AppEvent.DATA_SENT, sharedData2); fetchSharedData();[/INDENT] } private function sharedData(event:AppEvent):void { [INDENT]if (data.key == "MiniSearch_Search") { if (data.collection[0]){ com.esri.viewer.customskins.PopUpRendererSkin(data.collection[0]);[/INDENT] } } } private function sharedData2(event:AppEvent):void { [INDENT]var dataTable:Hashtable = event.data as Hashtable; if (dataTable.containsKey("MiniSearch_Search")) { var recAC:ArrayCollection = dataTable.find("MiniSearch_Search") as ArrayCollection; if (recAC[0]){ com.esri.viewer.customskins.PopUpRendererSkin(recAC[0]);[/INDENT] } } }
... View more
08-04-2012
12:36 PM
|
0
|
16
|
1328
|
POST
|
Robert - That did it! I had used the file name instead of the label. When I switched to the label, worked like a charm. Again, I can't thank you enough for all your help! Joe
... View more
07-19-2012
03:43 PM
|
0
|
0
|
325
|
POST
|
Robert - I will double check and make sure it's consistent. Thanks so much! Joe
... View more
07-19-2012
11:55 AM
|
0
|
0
|
325
|
POST
|
Robert - The widget label actually is "RequestWidget" but using this was unsuccessful, also, so I attempted the id "request"...I'll change back to the label. Here are lines 296-299 private function addToFavs_clickHandler(event:MouseEvent):void { AppEvent.dispatch(AppEvent.WIDGET_RUN,ViewerContainer.getInstance().widgetManager.getWidgetId("RequestWidget")); } And lines 316-321 <!--- @private --> <s:Button id="addToFavsButton" click="addToFavs_clickHandler(event)" fontSize="12" fontWeight="bold" label="Add to Favorites"/> Thanks so much for any assistance you can provide! Joe
... View more
07-19-2012
02:57 AM
|
0
|
0
|
325
|
POST
|
I'm working on the building blocks for a custom widget/Popup window. As a first step, I'm setting up to have a custom "Add to Favorites" button in the PopUp window fire a "RequestWidget" (a request for more information form) to open. When I use the code recommendations posted in the FV 3.0 forum, I receive the following error message. The code segments are below the error message. Any suggestions? Thanks so much in advance! Joe Error Message: TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.esri.viewer.managers::WidgetManager/onRunWidget() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at com.esri.viewer::AppEvent$/dispatch() at com.esri.viewer.customskins::PopUpRendererSkin/addToFavs_clickHandler() at com.esri.viewer.customskins::PopUpRendererSkin/__addToFavsButton_click() Imports: import com.esri.viewer.AppEvent; import com.esri.viewer.managers.WidgetManager; import com.esri.viewer.ViewerContainer; private function addToFavs_clickHandler(event:MouseEvent):void { AppEvent.dispatch(AppEvent.WIDGET_RUN,ViewerContainer.getInstance().widgetManager.getWidgetId("request")); }
... View more
07-18-2012
06:38 PM
|
0
|
5
|
2098
|
POST
|
Robert - Understood. Right, that makes sense. Thank you, again! Joe
... View more
05-15-2012
04:00 PM
|
0
|
0
|
478
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|