Message Boards

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
What does restrictBy exactly?
Answer
1/23/14 10:02 AM
Hi,

I set all of the restrictBy properties to false and expected that everything will be accessable by all liferay users, regardless what is stored in Database columns "companyid", "groupid", "userid" and "username".

But this isn't happening. Some of the DB entries will be shown by the user and some for guests. I don't know if something is cached and if I need to reload. Well logging in and out as well as restarting liferay does not the trick.

Background:

I fill the database tables, which the generated portlets are using, from an other application (YAWL). YAWL does not know about company id or group or userid. Therefore the above columns in the database are filled with "null" or "0" values. I thought setting all restrictBy properties to false would do the trick.

Do you have a suggestion about this?

Thank you,
Martin.

RE: What does restrictBy exactly?
Answer
1/30/14 7:57 AM as a reply to Martin Dames.
Martin Dames:
Background:
I fill the database tables, which the generated portlets are using, from an other application (YAWL). YAWL does not know about company id or group or userid. Therefore the above columns in the database are filled with "null" or "0" values. I thought setting all restrictBy properties to false would do the trick.
Hi Martin,

you shouldn't fill in the tables "manually". You always have to use the API that your portlet makes available for you. This is mandatory because there are some "mechanism" behing the scenes for improving performance, permissions, etc.

Please follow these links on how to generate remote services:

https://www.liferay.com/documentation/liferay-portal/6.2/development/-/ai/write-remote-service-classes-liferay-portal-6-2-dev-guide-04-en

https://www.liferay.com/es/documentation/liferay-portal/6.2/user-guide/-/ai/remotely-accessing-liferay-services-liferay-portal-6-2-user-guide-18--2

RE: What does restrictBy exactly?
Answer
3/4/14 7:11 AM as a reply to Juan G..
Hi Juan,

its my requiement to use the datatable tables, used by XMLPF, to act as data interface. My other application should not know anything about XMLPF or liferay.

In my case I need to restart Liferay server to get a fresh view upon the database tables. It seems, that Liferay or the generated Portlets will cache everything. Is there a possibility to add a refresh button to the generated portlets? If yes, could you please give me an hint where I have to modify XMLPF to generate this button?

Thank you,
Martin.

RE: What does restrictBy exactly?
Answer
3/4/14 9:27 AM as a reply to Martin Dames.
Martin Dames:
Hi Juan,

its my requiement to use the datatable tables, used by XMLPF, to act as data interface. My other application should not know anything about XMLPF or liferay.

In my case I need to restart Liferay server to get a fresh view upon the database tables. It seems, that Liferay or the generated Portlets will cache everything. Is there a possibility to add a refresh button to the generated portlets? If yes, could you please give me an hint where I have to modify XMLPF to generate this button?

Thank you,
Martin.
Hi Martin,

you are doing a huge mistake by not using the API. But if you want to work like this anyway (apart from suffering from poor performance etc) you will have to clear the cache and reindex the entities you updated/added in the datatable.

Search for those tips round there. There are some blogs explaining how to do it. Probably you should add a new remote service that simply calls the API for clearing cache and reindexing.