Questions Tagged With jsfhttps://answers.axonivy.com/tags/jsf/?type=rss&user=Tinh%20Nguyenquestions tagged <span class="tag">jsf</span>enFri, 22 May 2015 10:52:24 -0400Mapping data of parent JSF dialog get data back from Child Componenthttps://answers.axonivy.com/questions/1326/mapping-data-of-parent-jsf-dialog-get-data-back-from-child-component<p>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.</p> <p>My current solution :</p> <p>Parent dialog : <img alt="alt text" src="http://answers.axonivy.com/upfiles/parent_dialog_1.png"> Dataclass <strong>UserData</strong> <img alt="alt text" src="http://answers.axonivy.com/upfiles/userData.png"> Child Component <img alt="alt text" src="http://answers.axonivy.com/upfiles/child_component_1.png"> Mapping data in startLink <img alt="alt text" src="http://answers.axonivy.com/upfiles/Mapping.png"></p> <p>With this solution, I can get the selected <strong>IUser</strong> via object <strong>userData</strong>. 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.</p> <p>But I have a requirement to make it more flexible, do not use object <strong>userData</strong>. User UserName or IUser for input parameter.Like this Parent dialog : <img alt="alt text" src="http://answers.axonivy.com/upfiles/Parent_dialog_2.png"></p> <p>But when I try to mapping like my current solution. Parent dialog can not get the selected data from child component. I think because <strong>UserName</strong> is a string, and it will create a new object when we change it. For IUser, it's an Interface.</p> <p>So if anybody has experience to solve it. Please help me.</p> <p>Thank you and regards.</p>Tinh NguyenFri, 22 May 2015 10:52:24 -0400https://answers.axonivy.com/questions/1326/mapping-data-of-parent-jsf-dialog-get-data-back-from-child-componentjsfcomponent