PDA

View Full Version : DrillDown and Navigate Forwards



Tom Murphy
26-May-2015, 02:24 AM
Hi DAW

I have a question about forwards navigation.

I have 3 views A, B and C for example, with the following DDO structures



Object oA is a cWebView
:
Object oParent_DD is a Parent_DataDictionary
End_Object

Set Main_DD To oParent_DD
Set Server To oParent_DD
:
End_Object

Object oB is a cWebView
:
Object oParent_DD is a Parent_DataDictionary
End_Object

Object oChild_DD is a Child_DataDictionary
End_Object

Set Main_DD To oChild_DD
Set Server To oChild_DD
:
End_Object

Object oC is a cWebView
:
Object oChild_DD is a Child_DataDictionary
End_Object

Set Main_DD To oChild_DD
Set Server To oChild_DD
:
End_Object


If I find a record in view A and drill down to view B it forward navigates by FromParent, if I then drill down from view B to view C it forward navigates by FromMain, which is what I want however it attempts to find the parent record, why? I just want it to the find the child record.

8900

I am sure this was working before the beta navigation changes but I can't go back and test that now.

John Tuohy
26-May-2015, 01:54 PM
Does oC view have a parent DDO as well? It should.

-John

Tom Murphy
26-May-2015, 06:15 PM
Hi John

No, it just has the child. I just want to find the same child record from view B. And because I know that record is going to be correct I don't need to the parent.

Tom

John Tuohy
26-May-2015, 06:23 PM
You need the parent DDO. The framework has no idea what you are going to do with that view so it wants to make sure it can properly constrain it to the parent. Try it and see what happens.

-John

Tom Murphy
26-May-2015, 07:40 PM
You are right that does work. But if I am moving from one view to another by from main as the main dd's matched, I would have thought (and I may be wrong), that only the main dd record would need to be found again, and not the parent? In my case I really don't need the parent at all.

Tom

Tom Murphy
26-May-2015, 07:47 PM
I should add that both views B and C are zoom views as well.

John Tuohy
27-May-2015, 10:59 AM
Maintaining proper relates-to constraints is an essential part of the drill down logic. Since these are being applied dynamically, the classes does extra error checking to make sure that required pieces are all there. The error you saw was a programming error specifically created to catch this kind of error.

The path you took to get to this view requires that there is a drilldown constraint. There is no way for the framework to know that in this particular view the parent constraint is not needed. To do that it would have to know about all the possible ways this view could be navigated to, all the possible views it might navigate to, whether you are returning data, whether you are editing data, etc.

However, if you are certain that this is a simple view that doesn't use the parent at all and therefore does not need automatic constraints, you could shut off the dynamic constraints in the view by setting pbDynamicConstraints to false. I think that might work.

-John