--- Begin Message ---
Hello everybody,
I think this method should be called only ones when it is referenced
from document_content.xhtml
<ui:decorate template="/incl/documents_table.xhtml">
<ui:param name="documents"
value="#{documentActions.childrenSelectModel}" />
But instead, it is called everytime documents is referenced in
documents_table.xhtml.
This is not good because I've used this as an example and the diffrence
was that here no document needed to be selected by default, so the
getter kept getting all the documents (this is quite an overhead if
there are many documents, but the functionality was ok). Now some
documents(sections in my case) need to be checked by default. For this
to happen in the getter method getChildrenSelectModel
(getsectionsSelectModel in my case) I added some sections to the list of
selected sections. Imagine adding the same sections to the list 20 times
=> when I publish, I end up publishing the same document 20 times in the
same section.
Now I almost found a workaround(some kind of lasy loading - but it's not
100% safe) and the method still gets called so many times. I think this
problem is quite important because it happens in document_content page -
that is used so often.
Any idea is apreciated.
Thank you !
Narcis Paslaru
npaslaru wrote:
Author: npaslaru
Date: Thu Feb 22 09:33:01 2007
New Revision: 12705
Modified:
org.nuxeo.ecm.webapp/trunk/src/org/nuxeo/ecm/webapp/contentbrowser/DocumentActionsBean.java
Log:
XXX : Please investigate !
Modified:
org.nuxeo.ecm.webapp/trunk/src/org/nuxeo/ecm/webapp/contentbrowser/DocumentActionsBean.java
==============================================================================
---
org.nuxeo.ecm.webapp/trunk/src/org/nuxeo/ecm/webapp/contentbrowser/DocumentActionsBean.java
(original)
+++
org.nuxeo.ecm.webapp/trunk/src/org/nuxeo/ecm/webapp/contentbrowser/DocumentActionsBean.java
Thu Feb 22 09:33:01 2007
@@ -447,6 +447,7 @@
// SelectModel to use in interface
public SelectDataModel getChildrenSelectModel() throws ClientException {
+ //XXX : this proves that this method is called too many times
log.info("Getter children select model");
DocumentModelList documents = navigationContext
.getCurrentDocumentChildren();
_______________________________________________
ECM-checkins mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-checkins
--- End Message ---
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm