Hi, I have a scenario like this: I build an Ivy component for user selection(Autocomplete). Then after select a user, parent dialog should receive the selected IUser object. My current solution : Parent dialog : Dataclass UserData Child Component Mapping data in startLink With this solution, I can get the selected IUser via object userData. Because I think in this case, 2 variables point to the same memory, so parent dialog can get the updated data when it change on child component. But I have a requirement to make it more flexible, do not use object userData. User UserName or IUser for input parameter.Like this Parent dialog : But when I try to mapping like my current solution. Parent dialog can not get the selected data from child component. I think because UserName is a string, and it will create a new object when we change it. For IUser, it's an Interface. So if anybody has experience to solve it. Please help me. Thank you and regards. asked 22.05.2015 at 10:52 Tinh Nguyen |
Another approach could be, to simply map output arguments for the start method of the component. So, define an output argument in the interface of the component of type IUser. And then, inscribe the result mapping in user dialog start event of the component. This works but has one bigger issue: The result mapping is done after parent dialog is rendered. So you will see values which are not up to date there (respectively with a delay of one time refresh) even though the data is correct. But have a look at it anyway. answered 29.05.2015 at 09:55 Dominik Regli ♦ Thank you Dominik. You help me more clear about the problem. I'm still using the result mapping now.
(16.06.2015 at 03:12)
Tinh Nguyen
|
Maybe it's a solution for you to work with a callback method? You can get more details about it, in the HtmlDialogDemos project -> Component Callback Demo (Component/ComponentEventListenerDemo.ivp). answered 29.05.2015 at 09:54 Dominik Regli ♦ Barbara Brugger ♦♦ |
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 22.05.2015 at 10:52
Seen: 4,590 times
Last updated: 28.11.2016 at 11:04