Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Ketan Patel
Register users to be able to search for users
10 de Agosto de 2012 21:17
Resposta

Ketan Patel

Ranking: Junior Member

Mensagens: 72

Data de entrada: 4 de Maio de 2012

Mensagens recentes

Hi,

I want register users to be able to search for users and then click friends request. How can I achieve this?

Please reply me ASAP.

Thanks in advance.
Brian Kim
RE: Register users to be able to search for users
11 de Agosto de 2012 00:00
Resposta

Brian Kim

LIFERAY STAFF

Ranking: Expert

Mensagens: 319

Data de entrada: 16 de Agosto de 2004

Mensagens recentes

Hi Ketan,

This question is _really_ broad. There are a million different ways that this could be accomplished, but 99% of them might not meet your needs. For instance, one answer could be:

Create a portlet that queries the database using our service methods, output a list using a JSP, and then stick a button on the page that makes a friend request to the other person, who then needs to accept.

But then, that's probably not THE answer you were looking for. emoticon
Hitoshi Ozawa
RE: Register users to be able to search for users
11 de Agosto de 2012 00:59
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7949

Data de entrada: 23 de Março de 2010

Mensagens recentes

I want register users to be able to search for users and then click friends request. How can I achieve this?


The easiest way is to post your request to the Marketplace to have someone develop it for you and then you can just purchase the portlet to deploy it on your server.
Ketan Patel
RE: Register users to be able to search for users
11 de Agosto de 2012 03:26
Resposta

Ketan Patel

Ranking: Junior Member

Mensagens: 72

Data de entrada: 4 de Maio de 2012

Mensagens recentes

Hi Brian,

Yes, you are true. I thought the same for full-fill my current requirements.

Thanks,
Ketan Patel
Hitoshi Ozawa
RE: Register users to be able to search for users
11 de Agosto de 2012 03:39
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7949

Data de entrada: 23 de Março de 2010

Mensagens recentes

So that was it? You're not having any problem getting a list of users in the same group or on using the search container? :-)
Ketan Patel
RE: Register users to be able to search for users
11 de Agosto de 2012 05:05
Resposta

Ketan Patel

Ranking: Junior Member

Mensagens: 72

Data de entrada: 4 de Maio de 2012

Mensagens recentes

Hi Hitoshi,

I wants in my search criteria only registered user, than users are from whatever groups it's fine.
Hitoshi Ozawa
RE: Register users to be able to search for users
11 de Agosto de 2012 05:37
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7949

Data de entrada: 23 de Março de 2010

Mensagens recentes

Then it's just a matter of calling dynamic query in UserLocalServiceUtil. Shouldn't take too much time to develop.
Sreeraj AV
RE: Register users to be able to search for users
12 de Agosto de 2012 23:59
Resposta

Sreeraj AV

Ranking: Regular Member

Mensagens: 236

Data de entrada: 26 de Abril de 2010

Mensagens recentes

Ketan Patel:
Hi,

I want register users to be able to search for users and then click friends request. How can I achieve this?

Please reply me ASAP.

Thanks in advance.



You can customize Directory portlet for this..

Add a new JSP page under the same hook and implement Add Friend functionality inside JSP.

Now modify directory portlets user\search_columns.jspf by adding a new column for sending friendship request which has a javascript method call.

In the javascript method implementation, you have to use AUI.io.request class, which has a method that can call our new JSP file without reloading the page or calling the ProcessAction method .. see the example..

use var url=''/html/portlet/directory/user/newJSPFile.jsp instead of var url = '<%= ajaxCallResourceURL.toString() %>';