VMware {code} Community
myelaman
Enthusiast
Enthusiast

Please suggest a way to show popups without explicitly pushing a context object for it


I am using a "add"button above the data grid in my plugin and on click of the add button,i am showing a popup


as a title window.I  i have to explicitly pass the context to the title window.Could you please let me know how to use the pop ups for the buttons and pass the contextobject


 


My code:


 public function onNetworkClick(data:Object):void {


 var win:NetworkDetailsView = PopUpManager.createPopUp(this, NetworkDetailsView, true) as NetworkDetailsView;


win._contextObject = this._contextObject;


PopUpManager.centerPopUp(win);


}


 


<mx:AdvancedDataGridColumn headerText="Network Name" dataField="url" width="200">


<mx:itemRenderer>


<mx:Component>


<mx:Label text="{data.name}" 


 textDecoration="underline" 


 color="0x336699" 


 buttonMode="false" 


 useHandCursor="true" 


 mouseChildren="false"


 click="outerDocument.onNetworkClick(this.data)"/>


</mx:Component>


</mx:itemRenderer>


</mx:AdvancedDataGridColumn>


 


 


Please point me to any example where i can directly use which has the same usecase of providing buttons on datagrid and popping up dialogs?


 


Marianne


 


 


 

 public function onNetworkClick(data:Object):void



          {



              var win:NetworkDetailsView = PopUpManager.createPopUp(this, NetworkDetailsView, true) as NetworkDetailsView;



              win._contextObject = this._contextObject;



              win.vtsNteworks = this.vtsNetworks;



              win.networkName= data.name;



              Alert.show(win._contextObject +"context");



              Alert.show(data.name+"name");



              PopUpManager.centerPopUp(win);



          }


5 Replies
laurentsd
VMware Employee
VMware Employee

Sorry, I don't have any ready made samples similar to your use case.  Since you are passing the mediator's "this" reference in createPopup() what is the problem accessing the contextObject field?

myelaman
Enthusiast
Enthusiast

the problem is in the popup,i still get context object as null.Do we support dialog component in 5.5?like single page dialog?Also,in my use case,i am unable to make two separate property requests in mediator.I dont find the "requestid" attribute for property request  in the api for 5.5 sdk?I was using it for 6.0.Please suggest how to handle to property requests responses in same mediator?

0 Kudos
laurentsd
VMware Employee
VMware Employee

The SDK has a Dialogs class for generic OK, OK/Cancel dialogs, etc.

The requestId attribute has been there since 5.1, in the DataRequest class from which PropertyRequest derives.

myelaman
Enthusiast
Enthusiast

Thanks Laurent.Could you please point me to the dialogs usage sample or example

0 Kudos
laurentsd
VMware Employee
VMware Employee

0 Kudos