| Author |
How to use ajax in portlet ?
|
Ajil Mohan
Greenhorn
Joined: Feb 20, 2010
Posts: 8
|
|
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
|
SCJP 1.5
|
 |
Ashish Sarin
author
Ranch Hand
Joined: Nov 20, 2000
Posts: 403
|
|
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
|
Author of
Getting started with Spring Framework
Portlets in Action
Spring Roo 1.1 Cookbook
Portlets blog – Spring Roo blog
|
 |
Ajil Mohan
Greenhorn
Joined: Feb 20, 2010
Posts: 8
|
|
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
Joined: Nov 20, 2000
Posts: 403
|
|
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
Joined: Feb 20, 2010
Posts: 8
|
|
Hi Ashish,
Thanks providing this information . Its nice to point out the issues .
regards
Ajil
|
 |
 |
|
|
subject: How to use ajax in portlet ?
|
|
|