Posted: 14 Oct 2015 13:08 EDT Last activity: 16 Oct 2015 9:24 EDT
Including a section in Repeating Dynamic Layout using Clipboard page not working
I am trying a section that is defined in our WorkClass into a Repeating Dynamic Layout. My WorkClass is CAG-FW-ICFW-Work-GateRelease.
The Repeating Dynamic layout is set for repeating based on a Code-Pega-List Page List. The Page is of type "CAG-Data-InventoryItem". To include the section inside the Repeating Dynamic Layout, i selected "Using Clipboard Page" at the time of include, and defined my WorkClass name in the Class field.
I can see the Section name that i want to include in the "Section" field. When i select it and then click submit, i get an error "Unable to open instance of CAG-Data-InventoryItem!TempSectionForInclude".
I am not sure why it is looking for the section rule in CAG-Data-InventoryItem class when i have explicitly defined it as "CAG-FW-ICFW-Work-GateRelease".
Giving some screenshots of the section rule with errors.
This one is before including the section. Note the Page List reference and its class structure.
Once the section is included, i get this error.
Please tell me if i am doing anything wrong in here. Appreciate any help in this regard.
Your section rule that is open is in your work class CAG-FW-ICFW-Work-GateRelease which means it’s context is .pyWorkpage and of type CAG-FW-ICFW-Work-GateRelease. When you add the Repeating Dynamic Layout you bind it to the pagelist property InventoryList of type CAG-Data-InventoryItem, this changes the context of anything inside the repeating dynamic layout to .InventoryList of type CAG-Data-InventoryItem. Therefore there is no need to change the context of your section include, what you need to do is define your section to be repeated in the correct context: CAG-Data-InventoryItem.
Remember your section to be included is meant to work with a single page of data of type CAG-Data-InventoryItem. You cannot do this from your work class i.e. .pyWorkpage as the property .InventoryList is a pagelist not a page.
I understand your answer, I am facing a problem in the same lines, as per Gopalan's description the section "MultipleVehicleBackup"is in "CAG-FW-ICFW-Work-GateRelease" class, and the Repeating Dynamic Layout elements are displayed from a PageList of type "CAG-Data-InventoryItem", now the Repeating Dynamic Layout context is "CAG-Data-InventoryItem". When I click on a button in the Repeating Dynamic Layout I want to refresh the top section "MultipleVehicleBackup" which is in "CAG-FW-ICFW-Work-GateRelease" context, where as the button I clicked is in "CAG-Data-InventoryItem" context. How do I achieve this. Can you please provide me a clue on this. Thanks a lot in advance.
Thanks Cecil Howell for the response. I figured that is what was going on, but thanks for confirming that. The only irony is when we are including the Section using the Clipboard page, it allows us to enter a Class Name. Because of that i assumed, PRPC would be dynamically switch the context based on the Class Name that is given in the Dialog. I think the product should not allow users to enter the Class Name, since that causes lot of confusion.
I was able to get it resolved now. I have created the section rule in the Data Class.
Sudheer, for you to refresh the parent section, on click event run the script "window.location.reload(true)". This should refresh the section after your activity execution.