Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Troy Griffitts
Liferay.Service.* javascript relocation? UPDATED (still need help)
March 21, 2013 1:58 PM
Answer

Troy Griffitts

Rank: New Member

Posts: 18

Join Date: August 6, 2011

Recent Posts

Hey guys,

We're trying to test out 6.2M4 to be sure our system works ok with the upgrade. Our integration uses the javascript Liferay.Service.* calls (in 6.1.1GA2) to access the jsonws services. These seem to be gone now in 6.2M4. Were these deprecated? Relocated? What is my recommended upgrade path, if my portlets use javascript calls like:

Liferay.Service.MB.MBCategory.getCategories

Thank you for any assistance,

Troy

UPDATE (still need help):

Reference to bug submitted: LPS-33859

OK, so it looks like Liferay.Service.* javascript namespace has been collapsed to a single Liferay.Service() method, so the equivelent call from:

var categories = Liferay.Service.MB.MBCategory.getCategories(params);

is

var categories = Liferay.Service('/mbcategory/get-categories', params);

Almost...

In the old invocation model, if you passed a callback after 'params', your call would be asynchronous. If you didn't, as shown above, your call would block until the service returned a result and that result would be returned from the call (into the var categories variable above).

The new calls seem to be asynchronous and return nothing.

Does anyone know what the new syntax is for the sychronous blocking versions of these calls?

Thanks for any help,

Troy