Hi, I'm having an strange problem. I'll try to show it as clear as possible.
1- I have on my template the following declaration:
------------------------------------------------------------------------------
<content:declareContainerList name="contenedorPrincipal"
title="Servicios">
<content:declareContainer>
<content:declareField name="titulo" type="SmallText"
title="Titulo"/>
<content:declareField name="contenido" type="BigText"
title="Contenido"/>
</content:declareContainer>
</content:declareContainerList>
------------------------------------------------------------------------------
>From a parent page I'm creating all toghether a few child pages. Those pages
use the same template I'm
refering to. And all those pages are created from a containerList called
mainContentList0.
2- In these pages I'm doing a submenu where I'm listing, in addition of the
title page,
the field "titulo" from each container "contenedorPrincipal" in the
containerList.
I show a fragment of the code that generates de submenu where I found the
problem.
------------------------------------------------------------------------------------------------------------------------------------------------------------
public void getPageSubTree( JahiaData jData,int currentPageId,
PageContext pageContext,String contexturl)
throws JahiaException{
(...)
JahiaPage navigationLink = (JahiaPage)
navigationContainer.getFieldObject(
"pagina" );
if (navigationLink != null) {
(*) JahiaContainerList contenedorPrincipal =
jData.containers().getAbsoluteContainerList("contenedorPrincipal",navigationLink.getID());
if(contenedorPrincipal==null){
contenedorPrincipal =
jData.containers().getAbsoluteContainerList("mainContentList",navigationLink.getID());
}
armarDivs(jData,navigationContainer,navigationLink,out,contenedorPrincipal,contexturl);
}
(...)
}
------------------------------------------------------------------------------------------------------------------------------------------------------------
where
armarDivs makes the menu taking information from their parameters.
3- Then, always in the same template, I have these tags, where I charge and
show the content of "contenedorPrincipal"
containerList, which I list then also in the submenu.
------------------------------------------------------------------------------------------------------------------------------------------------------------
<content:containerList name="contenedorPrincipal"
id="contenedorPrincipal">
(**) <jahiaHtml:actionMenu name="contenedorPrincipal"
namePostFix=""
resourceBundle="jahiatemplates.Corporate_portal_templates_v2">
<content:container id="Principal">
| <a href='#<content:textField
name="titulo"/>'><content:textField name="titulo"/></a>
</content:container>
<logic:notEmpty
name="contenedorPrincipal">|</logic:notEmpty>
</jahiaHtml:actionMenu>
</content:containerList>
------------------------------------------------------------------------------------------------------------------------------------------------------------
4- Finally, I show the problem with an example:
In the page with id=15 I have the containerList mainContentList0 where I
create 3 childs: id=17, id=18, and id=19,
all of them with the same template.
After creating those pages, and when I go to the page whith id=17, in the
getActionMenu of the containerList
"contenedorPrincipal" marked whith (**) I have, in his 5th parameter, the
id=19 in place of id=17. This change
makes that when I charge information in this containerList, it charges on
the page with id=19 instead of charges
it on page with id=17.
After doing many tests, I found that the problem is in the line I marked
with (*).
Nevertheless I don't know how to solve the problem. All my variables are
declared inside the method and they
shouldn't affect in the construction of the page and their containers.
Perhaps the problem is to take the
containerList as absolute, but I don't know another way to do it.
Does anybody have any suggestion?
Thanks,
Silvana.
--
View this message in context:
http://www.nabble.com/getActionMenu-with-wrong-parameters-tf3526104.html#a9838092
Sent from the Jahia - Template mailing list archive at Nabble.com.