Reputation: 11
Here is just a simple example of my code
[DefaulClassOptions]
class APerson : XPObject
{
private int data;
public int Data {
get{ return data; } set { SetPropertyValue("Data", ref data, value); }
}
[Action(Caption = "Get Data")]
public void getData(myClass mclass)
{
this.Data = mclass.Data2;
}
}
class myClass
{
private int data2;
public int Data2 {
get; set;
}
}
Now, everything works fine. Clicking the "Get Data" button opens up a popup and prompts for the field. I wanted to know that if there is a way through which I can send data from APerson class to the popup window so that it displays data value if it has been set previously.
Upvotes: 0
Views: 2436
Reputation: 538
It's not possible when using the ActionAttribute, which is designed for simple cases only. For more complex scenarios, use a ViewController with a PopupWindowShowAction and access the current View object information as per this XAF documentation article.
Upvotes: -1