Forums Register Login

How to use ajax in portlet ?

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
Hi Ashish,

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

regards
Ajil
We can walk to school together. And we can both read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 4172 times.
Similar Threads
Dependent drop down boxes with javascript
Dynamic populating the drop down list based on the selected value of first list
what is Seam?
Drop down from DataBase problem
ajax dynamic combo
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:07:01.