RE: Displaying more than 200 assets with asset publisher ADT?

thumbnail
Fernando Fernandez, modified 7 Years ago. Expert Posts: 401 Join Date: 8/22/07 Recent Posts
Hi all,

I'm in Liferay 7 CE ga7 and we have use case where we have aprox. 600 assets needing to be displayed at the same time (points in a map, if you want to know).

We're trying to do this with a structure, asset publisher and an ADT. It stops at 200.

Looked around, there's a parameter called  search.container.page.default.deltaand another called  asset.filter.search.limit but they're being ignored for more than 200.

Apparently it might be because of this piece of code in SearchContainer.java, where MAX_DELTA is hardcoded to 200:

    public void setDelta(int delta) {
        if (delta <= 0) {
            _delta = DEFAULT_DELTA;
        }
        else if (delta > MAX_DELTA) {
            _delta = MAX_DELTA;
        }
        else {
            _delta = delta;
        }

        _calculateStartAndEnd();
    }
​​​​​​​
Anybody has a workaround for this? (besides abandoning asset publisher and creating a portlet?) Something like fetching the next page in the ADT?

TIA

Fernando


P.S.: if someone could explain why the hard-coded value set at 200 it would also be interesting. ;-)
thumbnail
David H Nebinger, modified 7 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
The problem is that asset publisher can have performance issues; unlike most others, it generally relies on the asset publisher, ADTs and interpreted templates necessary to render itself.

The limit on 200 is used to prevent against bugs opening on slow performance when trying to render, for example, 600 assets.

It tends not to work well on mobile browsers, some desktop browsers w/ so much content, ...

200 limit is there to protect you.
thumbnail
Fernando Fernandez, modified 7 Years ago. Expert Posts: 401 Join Date: 8/22/07 Recent Posts
Thanks David. We finally decided to rewrite the ADT as a portlet. 

​​​​​​​Fernando