I found a way of solving this problem
here:
Unfortunately, the reported solution has no real
explanation.
In my case materialContainers and familyContainers are
created in globals.inc page.
globals.inc is included in header.inc, so it is used for
every single template.
One example of wrong code line should
be:
materialValues.append(ExpressionMarker.drawMarker("currentSite.homePage.containerLists[\"materialContainer\"].getContainerByID("+materialContainer.getID()+").fields[\"materialValue\"].value",
true));
that explicitly points to the homePage.
The first time that globals.inc is invoked is when home.jsp
gets invoked, so probably the containers I am trying to find are considered to
be related only to the homepage.
I would like to understand what happens when I invoke
something like:
jData.containers().declareContainer(
"projectCategoriesContainer", "Categories container", projectCategoriesFields
);
Does the container created is related to a specific page,
or is it possible to retrieve it in every page ?
What happens if the declareContainer method is invoked
multiple times in different jsp ?
Thankyou very much, bye.
From: Serge Huber [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 03, 2004 12:04 PM
To: [EMAIL PROTECTED]
Subject: Re: Filter combos in document listing
The error you are getting seems to be because the familyContainer doesn't seem to be defined on the site's home page. The _expression_ you are using :
currentSite.homePage.containerLists["familyContainer"].getContainerByID(123).fields["familyValue"]
Looks for a container with ID 123 on the site's home page. It must exist before you can use the _expression_.
Regards,
Serge Huber.
At 11:12 03.06.2004, you wrote:
Hi.
I have started using 'document listing' template for listing products.
As I want to have my combos with my content to filter products (not generic types and sources), I added two combos following the way in which you inserted the standard ones for 'types' and 'sources'.
One is for raw materials, the other is for families of products.
I followed these steps:
- Declare containers, fields and vectors in globals.inc;
- Add the filtering part in filters.inc;
- Create one page per combo following the trace of types.inc;
Combos get filled end get orderer correctly in edit mode.
In Live mode they remain empty; the console provides the following warnings:
571906 [Thread-23] INFO - GET = 200 OK (time: 0 ms) URI = /shared/manfrotto/ima
ge_bank/NeilLeventhal.jpg
573109 [Thread-20] WARN - Didn't find object for _expression_ currentSite.homePag
e.containerLists["familyContainer"].getContainerByID(123).fields["familyValue"].
value
573109 [Thread-20] WARN - Didn't find object for _expression_ currentSite.homePag
e.containerLists["materialContainer"].getContainerByID(120).fields["materialValu
e"].value
573125 [Thread-20] WARN - Didn't find object for _expression_ currentSite.homePag
e.containerLists["familyContainer"].getContainerByID(121).fields["familyValue"].
value
573140 [Thread-20] WARN - Didn't find object for _expression_ currentSite.homePag
e.containerLists["materialContainer"].getContainerByID(122).fields["materialValu
e"].value
573156 [Thread-20] WARN - Didn't find object for _expression_ currentSite.homePag
e.containerLists["familyContainer"].getContainerByID(123).fields["familyValue"].
value
573172 [Thread-20] WARN - Didn't find object for _expression_ currentSite.homePag
e.containerLists["materialContainer"].getContainerByID(122).fields["materialValu
e"].value
573172 [Thread-20] INFO - Served core engine for user guest from [127.0.0.1] in
[766ms]
I am using jahia 404 on sqlserver, jdk 14.
Thankyou very much for every possible help, bye.
Jahia : A collaborative source CMS and Portal Server
www.jahia.org Community and product web site
www.jahia.com Commercial services company
