tag:blogger.com,1999:blog-5874979429188093780.post2609983792804540843..comments2024-03-18T06:46:54.352+01:00Comments on Andrej Baranovskij Blog: Proxy ViewObject and Dynamic Editable UI in ADFAndrej Baranovskijhttp://www.blogger.com/profile/04468230464412457426noreply@blogger.comBlogger20125tag:blogger.com,1999:blog-5874979429188093780.post-29851879060100209292017-02-03T10:38:21.046+01:002017-02-03T10:38:21.046+01:00Hi Andrejus, nice post, thank you.
I have done an...Hi Andrejus, nice post, thank you.<br /><br />I have done an example with dynamic VO dummy and Dynamic Components, but when I execute the application with the AM pool disabled I have errors on Activation/Passivation.<br /><br />Any recomendation? Thank you in advanceAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-74737354519446106692013-09-25T15:00:55.621+02:002013-09-25T15:00:55.621+02:00Thanks Andrejus.. nice topic..
i tried to impleme...Thanks Andrejus.. nice topic..<br /><br><br />i tried to implement such nice idea but am experiencing a new problem has to do with passivation/activation of application module. this approach initialized VO dynamically remove dummy VO with actual VO. what kind of data that should be passivated/activated for such dynamic VOs.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-9945788595918614172013-09-25T04:50:31.643+02:002013-09-25T04:50:31.643+02:00Thanks for the pointers here Andrejus. The table ...Thanks for the pointers here Andrejus. The table binding was a new learning experience for me. I'm glad you took the time to describe this in this posting.<br /><br />Thanks again,<br /><br /><br />BradWBradWhttps://www.blogger.com/profile/16750044668400024875noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-17741699832127845512012-12-19T11:46:48.087+01:002012-12-19T11:46:48.087+01:00Hi Eugene,
I was testing recently your proposed w...Hi Eugene,<br /><br />I was testing recently your proposed way of removing nodeDefinition for the table - it doesnt work properly. Well, it works for initial table rendering, but if you decide to switch to another VO, ADF 11g R2 complains about invalid node definitions after refresh.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-87230191519902973192012-12-04T13:42:32.229+01:002012-12-04T13:42:32.229+01:00Hi,
Please send sample app you are trying to test...Hi,<br /><br />Please send sample app you are trying to test - I will take a look.<br /><br />Yes - this sample is implemented with ADF 11g R2, it can be downgraded to previous release.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-27269683006471730712012-12-04T13:39:25.506+01:002012-12-04T13:39:25.506+01:00Hi Andrejus,
Thanks for your suggestion. BTW your...Hi Andrejus,<br /><br />Thanks for your suggestion. BTW your example didn't work for JDeveloper 11.1.1.6.0. I redeveloped the example from scratch for this version of Jdeveloper. If you're interested I can send it to you.<br />I didn't have to use complete ADF dynamic generation, because your example works fine even with vo's that have view links, but for updating only. If I try to insert or delete through an AM Exposed client method, I get JBO-27023: Failed to validate all rows in a transaction whenever I get to the commit() statement. Would you know how to solve this? ThanksWilliam Chauhttps://www.blogger.com/profile/18038708361387293540noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-71029881958251370932012-11-23T10:49:50.058+01:002012-11-23T10:49:50.058+01:00Hi,
You may apply complete ADF dynamic generation...Hi,<br /><br />You may apply complete ADF dynamic generation, it might work for you: http://andrejusb.blogspot.com/2012/11/adf-generator-for-dynamic-adf-bc-and.html<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-34811141445875069182012-11-23T10:48:17.170+01:002012-11-23T10:48:17.170+01:00Hi Andrejus,
Great article. I was looking for a p...Hi Andrejus,<br /><br />Great article. I was looking for a proxy pattern for VO's and I came across your excellent article. I'm trying this technique with slightly more complexity but I am getting an error. In my case, the 2 VO's are also linked other view objects (the same for both VO's) through view links. When I try to remove one of the VO, I'm getting a java exception saying that it cannot be removed, because it's still being referenced. Do you know how to resolve this? I'm thinking of removing the view links, but then I need to remove the other view objects first. But then I have to re-create them also. Not sure if this is possible.William Chauhttps://www.blogger.com/profile/18038708361387293540noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-29874525503843503582012-04-14T07:42:22.265+02:002012-04-14T07:42:22.265+02:00Its much simpler for Master-Detail, check here - h...Its much simpler for Master-Detail, check here - http://andrejusb.blogspot.com/2010/04/dynamic-iterator-binding-to-reuse-view.html<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-13797134218802876362012-04-13T12:28:21.127+02:002012-04-13T12:28:21.127+02:00Hi Andrejus!
Can we do something similar for maste...Hi Andrejus!<br />Can we do something similar for master-detail tables.<br />I mean can we create a proxy for master and detail table and dynamically associate the VO instances.Prashanthttps://www.blogger.com/profile/09475795300847201625noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-33744669151684413362012-03-27T20:39:38.228+02:002012-03-27T20:39:38.228+02:00Hi Andrejus,
is proxyVoDef.setFullName("com.r...Hi Andrejus,<br />is proxyVoDef.setFullName("com.redsamurai.model.views.DataView");<br />sets the value of <br />DefName<br />is page def to<br />"com.redsamurai.model.views.DataView"Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-17681548590165590042012-03-04T10:08:34.604+01:002012-03-04T10:08:34.604+01:00For use case with tables and proxy VO, in order to...For use case with tables and proxy VO, in order to keep generic binding in Page Def - we can set it while switching from one VO to another inside AM method. Call setFullName(name) function for retrieved ViewDefImpl and set it to point to DataView:<br /><br />ViewDefImpl proxyVoDef = ViewDefImpl.findDefObject(voName);<br />proxyVoDef.setFullName("com.redsamurai.model.views.DataView");<br />vo = this.createViewObject("DataView", proxyVoDef);<br /><br />Node Binding points to proxy VO:<br /><br />nodeDefinition DefName="com.redsamurai.model.views.DataView" Name="DataView0"<br /><br /><br />I also like dynamic iterator approach, but I think proxy VO gives more centralized control over what is rendered in UI.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-77591454486944975642012-03-03T22:39:05.492+01:002012-03-03T22:39:05.492+01:00Additionally, table dynamic node binding is not wo...Additionally, table dynamic node binding is not working, not just because it points to specific vo definition, but because it doesnt accept expression language. It would work otherwise, simply it cant read page flow scope expression. Same is valid for other cases, for example if we have custom method pointing to the VO, etc.Andrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-69147755940856174442012-03-03T22:27:46.552+01:002012-03-03T22:27:46.552+01:00Yes, but leaving node binding empty, may cause pro...Yes, but leaving node binding empty, may cause proper key selection problem, this is more like workaround to me. While with proxy VO, you can change node definition programmatically always to be the same - my next blog post. I recommend to control data structure from ADF BC itself, is easier to maintain in centralized way, instead of using EL.Andrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-81591400424223572872012-03-03T22:20:54.038+01:002012-03-03T22:20:54.038+01:00You can run into some problem with dynamic iterato...You can run into some problem with dynamic iterator binding when you show data in af:table. Because DefNode attribute in the PageDef's tree.nodeDefinition points to the particular VO's definition. And you really get empty table (in case of using another VO's instance). So, just leave the DefNode attribute empty or remove it at all.Eugene Fedorenkohttps://www.blogger.com/profile/05514757367086948632noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-84396983107797838172012-03-03T18:48:30.912+01:002012-03-03T18:48:30.912+01:00If for you prefer another approach and it works in...If for you prefer another approach and it works in your case, i have blogged it as well. There is pointer in the post.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-26331620098902190132012-03-03T18:35:59.126+01:002012-03-03T18:35:59.126+01:00Exactly this doesnt work, when you have different ...Exactly this doesnt work, when you have different VOs :) i was testing this.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-77486496593849104512012-03-03T16:27:29.701+01:002012-03-03T16:27:29.701+01:00???
In your PageDef set
iterator Binds="#{pa...???<br />In your PageDef set<br /><br />iterator Binds="#{pageFlowScope.voName}" RangeSize="25" <br /> <br />and it works.<br /><br />Moreover, in such case your VO instances work in normal way (they save current row, uncommitted data, ...)Eugene Fedorenkohttps://www.blogger.com/profile/05514757367086948632noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-83833621990777952722012-03-03T15:54:16.756+01:002012-03-03T15:54:16.756+01:00No, dynamic binding works only when switching betw...No, dynamic binding works only when switching between same VO different instances.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-15060964270922520402012-03-03T13:44:07.989+01:002012-03-03T13:44:07.989+01:00Good post, Andrejus!
You said dynamically iterator...Good post, Andrejus!<br />You said dynamically iterator binding in Page Definition works only for Master-Detail VO instances. What did you mean? <br />I believe in this example you could use the following technique:<br /> <br /><br />For sure, in such case, you have to have “real” VO instances in the AM.Eugene Fedorenkohttps://www.blogger.com/profile/05514757367086948632noreply@blogger.com