--- Begin Message ---
Hello,
Anahide Tchertchian wrote:
Hi,
Narcis Paslaru a écrit :
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}" />
I'm aware that this is not optimal. It is due to the way value
expressions are resolved when rendering a page. I can't see right now
how it could be dealt with if we would like to keep on using templates
(in other words macros).
But instead, it is called everytime documents is referenced in
documents_table.xhtml.
Thanks for the info, I did not expect this to happen.
The table jsf components are surely to be blamed for that, and we've
been planning on using another component as existing one do not meet
our performance and feature requirements.
May I suggest displaytag ( http://displaytag.sourceforge.net/11/ ). It's
an open source tag library that deals with table rendering.I've used it
before in other projects with succes. Also we could modify it according
to our specific needs.
What do you think ?
This is something that will be dealt with soon. In the mean time, I
think using lazy loading is the way to go.
Now I don't understand how this rendering issues affect the
publication mechanism: why do you end up publishing the same document
in the same section 20 times (in one action, I suppose)?
Let me explain :)
For the rendering of the selected children documents there is no problem
because hte selected ones are kept in a separated list :
List<DocumentModel> selectedDocuments = documentsListsManager
.getWorkingList(DocumentsListsManager.CURRENT_DOCUMENT_SELECTION);
What I do for the sections is that when I retrieve them (I compose the
list of sections) I check if that document is published in the section
that I'm retrieving (in a recurrent way) and if so I just add that
section to the list of selected sections(offcourse after seeing this I'm
checking first if that section isn't already in the list).
Si if I was adding all those sections to the list of selected sections,
at the publishing action I just took al the selected sections and
publish the document in them. That's why I wind up with 20 publications
in the same section just for one action. Also, if I uncheck a section
that was checked by default, I think it would still get published.
Cheers,
anahide.
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
--- End Message ---
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm