Child Page Include data overriding parent page's rendering condition

I’m having difficulty with a skuid pageInclude. Here are the deets.

I have conditional rendering on a tab on my main page. That tab contains a pageInclude of the same page type as the main page, but displays a different record.

The issue I’m experiencing is that the child page’s data is determining the rendering for its’ parent page’s tab! Although, I found that the actual child page data was being loaded, just not displayed due to overriding its’ parent page’s rendering conditions.

Here’s how I tested this.

Pretend we have an opportunity field called “ShouldILoad__c” and two opportunities named “OppThing1” and “OppThing2.”

Our tab, “Deal Info On Renewed Deal” that contains the page include, will only render if ShouldILoad__c is true.

In scenario 1
OppThing1.ShouldILoad__c == true
OppThing2.ShouldILoad__c == false (which shouldn’t matter since it’s not the parent page)

So according to the rendering condition, this should load. And it does. But once I click on the tab, it disappears like so!

However In scenario 2 when
OppThing1.ShouldILoad__c == true
OppThing2.ShouldILoad__c == true

The tab loads and the pageInclude stays just as it should.

What can I do to fix this? Is this a bug?

Are any of the model names in the page include the same as the page calling the page include?

the parent Skuid page is calling an include of itself , correct? That would mean that all model names are exactly identical. As Pat is alluding to, this is probably your issue. You will probably need to make a clone of the Skuid page and change the model names then load this clone as the page include… That’s my guess anyway…

Yup. Reading the entire post would help. Raymond is spot on.

Haha… I do that all the time… I read the email notification, answer, and then realize there were three more paragraphs…

Yup, same page so all the same model names  :)

That’s correct , the model names are all identical. 

Hmm, that would be a pain to manage since it would mean changing both pages every time I want to make any change.

I guess I could use apex to automatically copy the data except the model names… What do ya’ll think? Am I going about this right?

You may be able to do a template with an inline frame to the page instead of a page include. Not sure if it would still result in the model name conflict.

Interesting! It does work, but it’s kind of laggy and all of the tabs show up on top in the iframe.

The only other idea I have is that you could bring the components from the page include into the main page so you don’t need a page include. This would give you a second set of components that would need updating, but only one page to edit

Hm that’s a cool idea, how doI get the components from the child page without doing a page include?

Is there any documentation on that?