Hi again,

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).
Well I've tried not using *<ui:decorate>* and *<ui:param>* - you should take a look at *document_publish.xml* And it has the exact same behaviour. I'm not sure if by macros you intended *<ui:decorate>* or the *dataTable* tag.

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.
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)?

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



Cheers,
Narcis

_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to