POST
|
dear Robert, Thanks for your code and help.i make some changes in your code and its worked for me. Thanks again
... View more
08-02-2014
12:21 PM
|
0
|
0
|
411
|
POST
|
Dear Robert I import com.esri.viewer.AppEvent in my custom page.if I update code like below url:URLRequest; var uv:URLVariables; var msArr:ArrayCollection = new ArrayCollection(); var transferData:Object = {message:"UserGroup",Value:"0"}; var data:Object={key:"user",collection:msArr}; url = new URLRequest("index.html"); uv=new URLVariables(); navigatetoURL(url,"_self"); com.esri.viewer.AppEvent.dispatch(com.esri.viewer.AppEvent.DATA_PUBLISH, data); so it should work. but not working. the other thing is that can you suggest me how to add a login page to flex viewer,Because I am doing all this exerceise for login page.
... View more
07-31-2014
08:36 AM
|
0
|
2
|
411
|
POST
|
the below code is calling index page of flex viewer var url:URLRequest var uv:URLVariables; var msArr:ArrayCollection = new ArrayCollection(); var transferData:Object = {message:"UGroup",Value:"0"};//value will come from database. msArr.addItem(transferData); var data:Object={key:"ug",collection:msArr}; AppEvent.dispatch(AppEvent.DATA_PUBLISH, data); url = new URLRequest("index.html"); navigateToURL(url,"_self");
... View more
07-31-2014
08:09 AM
|
0
|
4
|
411
|
POST
|
Dear Sir, this page only get user name and password.if it match from my database enteries.it calls the index page of flex viewer.the index page is the same flex viewer main page. thanks
... View more
07-31-2014
07:59 AM
|
0
|
5
|
729
|
POST
|
Dear All I want to add a login page to my flex viewer application.how it is possible. thanks in advance
... View more
07-31-2014
07:55 AM
|
0
|
1
|
3906
|
POST
|
Dear Sir, I place alert in addData.But not get any message.its means my data is not going to DataManager. private function addData(event:AppEvent):void { var key:String = event.data.key; Alert.show("Key Value"+key); if (key) { var dataCollection:Object = event.data.collection; if(dataTable.containsKey(key)) { dataTable.remove(key); } dataTable.add(key,collection); var data:Object ={key:key,data:dataTable}; AppEvent.dispatch(AppEvent.DATA_NEW_PUBLISHED, data); } } so what to do next.
... View more
07-31-2014
07:41 AM
|
0
|
7
|
729
|
POST
|
dear robert, i try it but cant succeed,see my sender and receiver function are below.please help i am stuck here from one week. sender function.------------------ var url:URLRequest var uv:URLVariables; var msArr:ArrayCollection = new ArrayCollection(); var transferData:Object = {message:"UGroup",Value:"0"}; msArr.addItem(transferData); var data:Object={key:"ug",collection:msArr}; AppEvent.dispatch(AppEvent.DATA_PUBLISH, data); url = new URLRequest("index.html"); uv = new URLVariables(); url.method = "post"; uv.name = "fred"; navigateToURL(url,"_self"); i am calling header widget in index page. Receiver Header Widget--- private function basewidget_initializeHandler(event:FlexEvent):void { // Allows other widgets to announce that image URL has been updated. AppEvent.addListener(AppEvent.DATA_PUBLISH, sharedDataUpdated); AppEvent.addListener(AppEvent.DATA_SENT, sharedDataUpdated2); fetchSharedData(); } private function sharedDataUpdated(event:AppEvent):void { Alert.show("1"); if (data.key == "ug") { if(data.collection[0]) { strCurrentUser=data.collection[0]["Value"]; } } } private function sharedDataUpdated2(event:AppEvent):void { Alert.show("shared2"); var dataTable:Hashtable = event.data as Hashtable; if (dataTable.containsKey("ug")) { Alert.show("condition"+"2"); var recAC:ArrayCollection = dataTable.find("user") as ArrayCollection; if (recAC[0]) { strCurrentUser=recAC[0]["Value"]; } } } from my alerts i check the conditon in sharedDataUpdated2 Alert.show("shared2"); executes.but (dataTable.containsKey("ug")) not execute.so please check .provide help. thanks for your kind cooperation.
... View more
07-31-2014
12:08 AM
|
0
|
9
|
729
|
POST
|
-----Sender Custom Page------------------ xmlns:fx="http://ns.adobe.com/mxml/2009" ibrary://ns.adobe.com/flex/spark" library://ns.adobe.com/flex/mx"Login Page" minWidth="955" minHeight="600" backgroundColor="#8099B2"> <s:layout> <s:BasicLayout/> </s:layout> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> <s:HTTPService id="UserService" url="http://localhost/mySirensData/Default.aspx" fault="httpFaultHandlerData(event)" showBusyCursor="false" requestTimeout="300" result="DataHandler(event)" resultFormat="xml" method="post" /> </fx:Declarations> <fx:Script> import com.esri.viewer.AppEvent; import com.esri.viewer.BaseWidget; import com.esri.viewer.IBaseWidget; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; import mx.rpc.remoting.Operation; import mx.rpc.xml.SimpleXMLDecoder; import mx.rpc.xml.SimpleXMLEncoder; import mx.utils.ArrayUtil; import mx.utils.StringUtil; [Bindable] private var RAc:ArrayCollection; [Bindable] public var params:Object ={}; private function httpFaultHandlerData(event:FaultEvent):void {"There was a problem in sending","Error " + event.message.toString());} private function DataHandler(event:ResultEvent):void { var msArr:ArrayCollection = new ArrayCollection(); var transferData:Object = {message:"UserGroup",Value:RAc[0]["Countchk"]}; msArr.addItem(transferData); //Not visible in my custom page method of basewidget class .addSharedData( ); } private function convertXmlToArrayCollection(file:String):ArrayCollection { var xml:XMLDocument = new XMLDocument(file); var decoder:SimpleXMLDecoder = new SimpleXMLDecoder(); var data:Object = decoder.decodeXML( xml ); var array:Array = ArrayUtil.toArray(data.parent.child); return new ArrayCollection(array) ; } </fx:Script> <mx:LinkButton id="NewUser" x="10" y="5" width="126" height="24" label="New User" color="#FF3322" fontFamily="New Times Roman" fontWeight="bold" fontSize="20" fontStyle="normal" visible="false" click="linkbutton1_clickHandler(event)"/> <s:BorderContainer x="423" y="226" height="109" width="472" borderColor="#FFFFFF" backgroundColor="#8099B2" borderStyle="solid" borderWeight="2" > <s:VGroup height="60" width="100%" > <s:FormItem width="460" height="20" label="User Name: " textAlign="left" color="#000000"> <s:TextInput id="txtUser" width="100%" color="#00000"/> </s:FormItem> <s:FormItem width="460" height="12" label="Password: " textAlign="left" color="#000000"> <s:TextInput id="txtPass" top="0" width="100%" color="#00000" displayAsPassword="true"/> </s:FormItem> </s:VGroup> <s:HGroup x="0" y="75" width="100%" height="25" horizontalAlign="center" verticalAlign="justify" color="#00000"> <s:Button id="lblLogin" label="Login" x="100" click="lblLogin_clickHandler(event)"/> <s:Button id="lblCancel" label="Cancel" x="100" /> </s:HGroup> </s:BorderContainer> </s:Application> from remote service result received and this send to header widget. ----------Receiver Widget---------------------------------- xmlns:fx="http://ns.adobe.com/mxml/2009" library://ns.adobe.com/flex/spark" library://ns.adobe.com/flex/mx" com.esri.viewer.*" com.dougmccune.controls.*" rtl" 100%" initialize="basewidget_initializeHandler(event)" > <fx:Script> import com.esri.viewer.AppEvent; import com.esri.viewer.TransferDataManager; import com.esri.viewer.ViewerContainer; function basewidget1_creationCompleteHandler(event:FlexEvent):void { // I want to get parameter value in this function On this value I will decide show or hide the edit option for the user. } private function img_clickHandler(event:MouseEvent):void { if(event.currentTarget.id=="IdentifyBtn") "Identify")); else if(event.currentTarget.id=="layers") "Layers")); else if(event.currentTarget.id=="Edit") { var url:URLRequest = new URLRequest("EditPage.html"); var uv:URLVariables = new URLVariables(); "post"; "fred"; _blank"); else if(event.currentTarget.id=="drawingToolsBtn") ((Tools")); </fx:Script> <mx:Canvas id="myCanvas" x="0" y="0" width="100%" backgroundColor="0x8099B2" height="150" borderColor="#FFFFFF"> <mx:Image id="imgbg" x="0" y="0" width="100%" height="80%" layoutDirection="ltr" maintainAspectRatio="false" source="assets/images/headerLogo.png" /> <mx:Image id="layers" x="5" y="120" width="10%" height="20%" layoutDirection="rtl" toolTip="All Layers" source="assets/images/02_Header.png" click="img_clickHandler(event)" /> <mx:Image id="IdentifyBtn" x="100" y="120" width="15%" height="20%" layoutDirection="rtl" toolTip="Identify" source="assets/images/i_info.png" click="img_clickHandler(event)" /> <mx:Image id="SearchButtonByRegion" x="200" y="122" width="10%" height="20%" layoutDirection="rtl" toolTip="Search By Region" source="assets/img/11.png" click="img_clickHandler(event)" /> <mx:Image id="SearchButtonByCity" x="290" y="122" width="10%" height="20%" layoutDirection="rtl" toolTip="Search By City" source="assets/img/12.png" click="img_clickHandler(event)" /> <mx:Image id="Edit" x="400" y="122" width="10%" height="20%" layoutDirection="rtl" toolTip="Edit" source="assets/images/i_draw.png" click="img_clickHandler(event)" /> <mx:Canvas> please read the creation complete handler.i want to get value from custom page here and on this value I will decide to show/hide edit option to the user. Thanks in advance.
... View more
07-30-2014
02:36 AM
|
0
|
11
|
729
|
POST
|
Dear Robert I have my custom mxml page.this page receive some parameter from database.from these parameter I decide current user.where this user is from admin group or normal group.from the value of the database I send one value to header widget as according to the user group and visible and hide some options for the user.please help to sove this.i already use single ton pattern.but so for no success.Always get null value in header widget. \thanks in advance
... View more
07-30-2014
01:00 AM
|
0
|
12
|
729
|
POST
|
Dear All/Robert Shilten I want to pass one parameter from my custom mxml page to header widget of flex viewer.please help me in this matter, Thanks to All.
... View more
07-29-2014
01:10 AM
|
0
|
15
|
1912
|
POST
|
I am working on one app.i want to pass parameter from my custom mxml page to flexviewer widget.how it is possible.Thanks in advance.
... View more
07-26-2014
03:05 AM
|
0
|
0
|
2896
|
POST
|
Dear All, i want to change the color and alpha values for the navigation control in seperate application for flex.i am not using the compile version of navigation control. Thanks for everyone who help me.
... View more
07-01-2014
12:45 AM
|
0
|
0
|
179
|
POST
|
Dear Sir, I solved the placement issue.the only problem which I am facing about skin and icon images of navigation control are not visible on the control.please guide me what can be the reason. Thanks.
... View more
06-18-2014
10:00 PM
|
0
|
0
|
633
|
POST
|
Dear Robert, I use your navigation widget in my code.The big problem is that it not directly come on the map.it always be down on the control of the map.Or UP right or left according to position of source control.i want it should directly come on map like in flex Viewer................................Sp please help how can this issue be solved. Thaks.
... View more
06-17-2014
11:09 PM
|
0
|
0
|
633
|
POST
|
protected function application1_creationCompleteHandler(event:FlexEvent):void { // TODO Auto-generated method stub ValuesList = new ArrayCollection( [ {color:"0xFFFF00", Name:"One", selected:false}, {color:"0x990000", Name:"Two", selected:false}, {color:"0x000066", Name:"Three",selected:false}, {color:"0x666666", Name:"Four", selected:false} ] ); } protected function dataGrid_gridClickHandler(event:GridEvent):void { // TODO Auto-generated method stub try { //if(event.columnIndex==1) { var obj:Object; var obj1:Object; obj=event.item; var bool:Boolean=obj.selected;//ValuesList[3]["selected"]; // var obj1= // if(bool) // lbl.visible=true; // else // lbl.visible=false; //lbl.text=obj.selected; lbl1.text=ValuesList[event.rowIndex]["color"]; //Alert.show(ValuesList[event.rowIndex]["color"]); } } catch(err:Error) { Alert.show(err.message); } } ]]> </fx:Script> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <s:DataGrid id="dataGrid" dataProvider="{ValuesList}" x="0" y="0" height="300" width="400" gridClick="dataGrid_gridClickHandler(event)" > <s:columns> <s:ArrayList> <s:GridColumn id="GridCol0" headerText="Col1" /> <s:GridColumn id="GridCol1" headerText="Col2" dataField="selected" editable="false" > <s:itemRenderer> <fx:Component> <s:GridItemRenderer> <fx:Script> <![CDATA[ import mx.controls.Alert; import mx.events.FlexEvent; public override function set data(value:Object):void { super.data=value if (value==null) { cb.selected=false } else { cb.selected=value.isEnabled as Boolean; } } /* override public function get value():Object { return cb.selected; } */ override public function prepare(hasBeenRecycled:Boolean):void { cb.selected = grid.selectionContainsIndex(rowIndex); } protected function cb_creationCompleteHandler(event:FlexEvent):void { // TODO Auto-generated method stub try { if(data!=null){ if(data.selected){ event.currentTarget.selected=true; }else{ event.currentTarget.selected=false; } } } catch(err:Error) { Alert.show(err.message); } } protected function cb_changeHandler(event:Event):void { // TODO Auto-generated method stub if(cb.selected) data.selected=true; else data.selected=false; //Alert.show(cb.selected+""); } protected function cb_updateCompleteHandler(event:FlexEvent):void { // TODO Auto-generated method stub if(data!=null){ if(data.selected){ event.currentTarget.selected=true; }else{ event.currentTarget.selected=false; } } } ]]> </fx:Script> <s:CheckBox id="cb" change="cb_changeHandler(event)" updateComplete="cb_updateCompleteHandler(event)" creationComplete="cb_creationCompleteHandler(event)" /> </s:GridItemRenderer> </fx:Component> </s:itemRenderer> </s:GridColumn> <s:GridColumn id="GridCol2" headerText="Col3" itemRenderer="clrRenderer" /> </s:ArrayList> </s:columns> </s:DataGrid> i am facing the problem for getting the current state of checkbox.when i click chcekbox inside data grid i get the old state.By means when i click on checkbox i get the current state not the state which will be change.like if it is unselect and i clcik it will select it give me unselect.please give me some clue. thanks in advance
... View more
09-24-2013
02:23 AM
|
0
|
0
|
518
|
Title | Kudos | Posted |
---|---|---|
1 | 07-04-2020 12:17 PM |
Online Status |
Offline
|
Date Last Visited |
05-30-2023
10:23 PM
|