Custom UIShell: getBinding returns null for any Tab running a taskflow

A few days ago, asked in forum that when we call a getActiveTabList for obtain a list of tabs opens at this moment, getBinding method always return null.

DynTabManager dynTabManager =(DynTabManager)JsfUtils.getManagedBeanValue("pageFlowScope.dynTabManager");
List listtabs =dynTabManager.getCurrentInstance().getActiveTabList();
for (DynTab t : listtabs) {
  //return null

It seems that the problem is that when we call t.getBinding(), the getCurrentBindingsEntry returns a bindingContainer for the current tab, instead of the BC of template

e.g: data.davelaar_demo_ui_view_UIShellPageDef.dynTabsTemplateBinding.r2.davelaar_demo_ui_view_pageDefs_

then when we do dynTabsBindings.get(getBindingKey()) in a getBinding method always return null

I added this lines in method getBingind of DynTab class

public DCTaskFlowBinding getBinding(){

 BindingContainer bc =BindingContext.getCurrent().getCurrentBindingsEntry();
 if (bc == null){
   return null;
 BindingContainer dynTabsBindings =(BindingContainer) bc.get(PAGE_TEMPLATE_BINDING_KEY);
 if (dynTabsBindings == null){
   // use current bc directly
   dynTabsBindings = bc;
 DCTaskFlowBinding binding = null;
 binding =(DCTaskFlowBinding) dynTabsBindings.get(getBindingKey()); // NOTRANS

 //new lines
 if (binding==null){
   BindingContext bindingCxt = BindingContext.getCurrent();
   // get uishell pagedef
   DCBindingContainer uishellBC=bindingCxt.findBindingContainer("davelaar_demo_ui_view_UIShellPageDef");
   //get template pagedef
   BindingContainer bc2= (BindingContainer)uishellBC.getExecutableBindings().get(0);
   return (DCTaskFlowBinding)bc2.get(getBindingKey());
 return binding;

Note:This post does not talk about Oracle UI Shell, we are talking about the UI Shell that can be downloaded from here.