Fórumok

Nyitólap » Liferay Portal » Deutsch

Kombinált nézet Egyszerű nézet Fa-nézet
Szálak [ Előző | Következő ]
toggle
Tom Cat
Update Method
2011. július 18. 3:54
Válasz

Tom Cat

Rangsorolás: Junior Member

Hozzászólások: 34

Csatlakozás dátuma: 2011. július 13.

Legújabb hozzászólások

Hello,

im new in developing on Liferay and i am searching for an update method.
For example when i refresh my page i want my portlet to be executed.

Best regards

Tom Cat
Stefan Brötz
RE: Update Method
2011. augusztus 29. 7:08
Válasz

Stefan Brötz

Rangsorolás: New Member

Hozzászólások: 8

Csatlakozás dátuma: 2010. február 1.

Legújabb hozzászólások

Hi Tom,

if you hit the refresh button of your browser, the render() method of every portlet on the page is executed. This behaviour is defined by the Portlet API, so there's no need for a dedicated update call.

However, execution of the render() method can be prevented by turning on a portlet cache. Have a look at the expiration-cache setting in your portlet.xml to check if you have caching enabled. (0=caching disabled, -1=cache forever, other positive value=cache generated content for the given number of seconds) Additionally, this default caching behaviour can be adjusted by using the CacheControl object (can be retrieved by response.getCacheControl()).

HTH, Stefan.

(By the way: This is the German part of the forum. You might not get many responses when posting questions in English here.)