• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to use ajax in portlet ?

 
Ajil Mohan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am new to portlet . I wish to know how to use ajax with portlets. Scenarios is, i have two drop downs in a jsp page. Based on the value in the first drop down i have to populate second drop down list.
I am using lifefray 6, and JSR 168.

regards

Ajil
 
Ashish Sarin
author
Ranch Hand
Posts: 432
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ajil,

Just curious to know, why you want to use JSR 168 when Liferay 6 supports JSR 286 ? If you plan to use JSR 286, then you'll find built-in support for AJAX in portlets.

If you plan to use JSR 286, then you'll find couple of AJAX portlet examples in src-ch-12to14.zip file at the following source code location: http://code.google.com/p/portletsinaction/downloads/list

regards
ashish
 
Ajil Mohan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ashish ,

Thanks for replay , we are thinking bout that . Between i got solution to use ajax with JSR 168. I use a servlet to process asynchronous request . Its working . I don't know its a good aproach or not.


regards
Ajil
 
Ashish Sarin
author
Ranch Hand
Posts: 432
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ajil,

The servlet lies outside the portal security infrastructure, therefore, you'll need to separately secure it, which could be additional overhead. I would suggest using JSR 286 portlets as the AJAX support is built-in, which will save lot of your effort that goes in securing servlets from unauthorized access. Also, all your controller logic remains inside your portlet class, instead of spread across portlets and servlets.

regards
ashish
 
Ajil Mohan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ashish,

Thanks providing this information . Its nice to point out the issues .

regards
Ajil
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic