tag:blogger.com,1999:blog-1759528437624391151.post4381742023536400035..comments2023-10-10T03:40:27.273-06:00Comments on fireChangeEvent(): Master Detail - Distilling the PatternAnonymoushttp://www.blogger.com/profile/00955517828414907243noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-1759528437624391151.post-25082997222729717132007-03-16T17:03:00.000-06:002007-03-16T17:03:00.000-06:00i'm posting here how i solved it. Maybe someone ca...i'm posting here how i solved it. Maybe someone can consider it useful.<BR/>I have a FormEditor which contains a master and details parts. When master fires a selection event, a new detail page will be instantiated and the selected object is passed to detail page through the selectionChanged method. <BR/>So in this method we have to setup our binding.<BR/>MasterDetailsBlock usually try to reuse the same instance of detail part and don't instantiate a new one for every selection.<BR/>So in selectionChanged code we have to check if we have already a bindingcontex instance, dispose it, and create a new one.<BR/><BR/><BR/>i wish that what i wrote can be comprensible and usefull for someone.<BR/><BR/>in databinding there is still some work to do for a better support of form and more specific API, but the project is great.<BR/> <BR/>Soon I'll try to find the time to write small tutorials on databinding (probably in italian) because there are too few docs about it. <BR/><BR/>:)<BR/><BR/>thx<BR/>giuliolokinehttps://www.blogger.com/profile/08297879851776402054noreply@blogger.comtag:blogger.com,1999:blog-1759528437624391151.post-44245203727285084702007-03-15T20:36:00.000-06:002007-03-15T20:36:00.000-06:00You have me at a bit of a disadvantage as I'm not ...You have me at a bit of a disadvantage as I'm not familiar with the ui.forms master detail. But I'm assuming that you have lifecycle events for when the detail view is created and when it's disposed. Correct? If the view is transient and changes depending upon the selection I don't think you need the Data Binding master detail APIs. All you would do would be to retrieve the object from the selection, bind your UI, and you're done. Then when a new selection is made a new view is created and you repeat. It would seem that the Data Binding master detail APIs only make sense when you have a, as you say, static view.Anonymoushttps://www.blogger.com/profile/00955517828414907243noreply@blogger.comtag:blogger.com,1999:blog-1759528437624391151.post-75949739114478566172007-03-15T08:57:00.000-06:002007-03-15T08:57:00.000-06:00i read your post and it's ok when you use "static...i read your post and it's ok when you use "static" detail view.<BR/><BR/>if you create i.e. 2 composites :<BR/>the first contains a list viewer<BR/><BR/>the second some text widgets that show details.<BR/><BR/>you can setup a observeDetailValue binding to fill the widgets with values from selection.<BR/><BR/>but when you use the master - detail implementation from ui.form package where detail pages are created "on the fly" on selection change, your pattern doesn't works.<BR/><BR/>I can't figure out a simple solution for this case.<BR/><BR/>have u any ideas? :)<BR/><BR/>i hope you can understand what i wrote.<BR/><BR/>giuliolokinehttps://www.blogger.com/profile/08297879851776402054noreply@blogger.com