Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
David Proba
Primefaces GMap not rendering
21 de Junho de 2012 03:47
Resposta

David Proba

Ranking: Junior Member

Mensagens: 48

Data de entrada: 27 de Junho de 2011

Mensagens recentes

Hey guys,

I have trouble with Primefaces GMap.
As long as I was using PF 3.2, there was no problem with GMap, since updating to PF 3.3.1 and Liferay Faces 3.1 GMap is not rendering any more.
Is this a PF issue or a Liferay Faces issue ?

I am using PF 3.3.1 with Liferay 6.1 CE and Liferay Faces 3.1.

Thanks for your suggestions...
Neil Griffin
RE: Primefaces GMap not rendering
21 de Junho de 2012 07:47
Resposta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 1993

Data de entrada: 26 de Julho de 2005

Mensagens recentes

When you get a chance, please try to reproduce the problem with FireFox+FireBug and let me know if you see any JavaScript errors in the FireBug console. Thanks.
David Proba
RE: Primefaces GMap not rendering
21 de Junho de 2012 13:36
Resposta

David Proba

Ranking: Junior Member

Mensagens: 48

Data de entrada: 27 de Junho de 2011

Mensagens recentes

Hi Neil,

thx for your help. There are 2 things from Firebug:
  • $("script[src*=\"/javax.faces.resource/primefaces.js\"]").attr("src") is undefined - shown in console
  • GET http://maps.googleapis.com/maps/gen_204?ev=api_ads&cad=src:apiv3,ads:0 gets status 204 No Content - shown in network, graphics
Neil Griffin
RE: Primefaces GMap not rendering
22 de Junho de 2012 06:45
Resposta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 1993

Data de entrada: 26 de Julho de 2005

Mensagens recentes

Do you have more than one PrimeFaces portlet on the portal page?
David Proba
RE: Primefaces GMap not rendering
25 de Junho de 2012 06:19
Resposta

David Proba

Ranking: Junior Member

Mensagens: 48

Data de entrada: 27 de Junho de 2011

Mensagens recentes

Yes, I have a couple of PF portlets on this page... Is this a problem ?
Neil Griffin
RE: Primefaces GMap not rendering
25 de Junho de 2012 07:29
Resposta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 1993

Data de entrada: 26 de Julho de 2005

Mensagens recentes

Yes, due to PrimeFaces Issue#4093 there can be JavaScript conflicts with more than one PrimeFaces portlet on a single portal page.

When you get a chance, please try it with one PrimeFaces portlet and see if your JavaScript errors go away. Thanks.
David Proba
RE: Primefaces GMap not rendering
17 de Julho de 2012 04:53
Resposta

David Proba

Ranking: Junior Member

Mensagens: 48

Data de entrada: 27 de Junho de 2011

Mensagens recentes

Hi Neil,

do you know when this issue with multiple PF portlets will be done ?
Unfortunatly, it's a partial showstopper....

Best regards
Neil Griffin
RE: Primefaces GMap not rendering
4 de Setembro de 2012 12:30
Resposta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 1993

Data de entrada: 26 de Julho de 2005

Mensagens recentes

I just committed a Liferay vendor-specific fix for FACES-1216. Please give it a try as soon as you can. You can download 3.1.0-ga1-SNAPSHOT artifacts from the snapshot repository.
David Proba
RE: Primefaces GMap not rendering
22 de Agosto de 2012 08:29
Resposta

David Proba

Ranking: Junior Member

Mensagens: 48

Data de entrada: 27 de Junho de 2011

Mensagens recentes

Hi Neil,

thx for your help so far.
Actually, the problem with gmap still appears.

Currently, I use Liferay 6.1 GA1, Liferay Faces Bridge 3.1.0 GA1 and PF 3.3 with multiple portlets on a page.
Without Gmap portlet there is no js error displayed in console.
All other portlets (i.e. DataTable within Dialog) are working properly, but as soon as I deploy additionaly this one portlet including Gmap, I get "$("script[src*=\"/javax.faces.resource/primefaces.js\"]").attr("src") is undefined" error in console...
Neil Griffin
RE: Primefaces GMap not rendering
22 de Agosto de 2012 08:55
Resposta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 1993

Data de entrada: 26 de Julho de 2005

Mensagens recentes

Does it work OK if the gmap portlet is the only portlet on the portal page?
David Proba
RE: Primefaces GMap not rendering
23 de Agosto de 2012 07:14
Resposta

David Proba

Ranking: Junior Member

Mensagens: 48

Data de entrada: 27 de Junho de 2011

Mensagens recentes

If GMap portlet is the only one, it works fine...
Neil Griffin
RE: Primefaces GMap not rendering
27 de Agosto de 2012 12:52
Resposta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 1993

Data de entrada: 26 de Julho de 2005

Mensagens recentes

Using the primefaces3-portlet demo, I added one p:gmap component tag (the same markup found in the GMap - Basic demo) to the view and I got the following JavaScript errors:

1Uncaught ReferenceError: google is not defined


When I compared the <head>...</head> section of my Liferay Portal page to the GMap - Basic demo page, I found that the Google Maps JavaScript resource was not being loaded. When I added the following to the WEB-INF/liferay-portlet.xml descriptor, it started working:

1<liferay-portlet-app>
2    <portlet>
3        ...
4        <header-portal-javascript>http://maps.google.com/maps/api/js?sensor=true</header-portal-javascript>
5    </portlet>


It also worked with two p:gmap component tags on the page.
David Proba
RE: Primefaces GMap not rendering
31 de Agosto de 2012 01:26
Resposta

David Proba

Ranking: Junior Member

Mensagens: 48

Data de entrada: 27 de Junho de 2011

Mensagens recentes

This does not help.... I still get
TypeError: $("script[src*=\"/javax.faces.resource/primefaces.js\"]").attr("src") is undefined

... just like still using Liferay Faces 3.1 RC1.... in fact I am using GA1
Neil Griffin
RE: Primefaces GMap not rendering
31 de Agosto de 2012 10:40
Resposta

Neil Griffin

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 1993

Data de entrada: 26 de Julho de 2005

Mensagens recentes

Hi David,

When you have time, could you start with a simple portlet project, and add the p:gmap component in such a way that it reproduces the problem?

If you are using the Liferay Maven SDK, then perhaps you could start with "mvn archetype:generate" and create a simple PrimeFaces 3 portlet from the list of archetypes. Note that you will have to modify the pom.xml in order to use the 3.1.1-ga1 version of Liferay Faces artifacts.

If you are using Liferay IDE 1.6.0, then you can do the same with File->New (Liferay Portlet). There is a new feature that lets you pick PrimeFaces when you are creating the project. See the screenshot in Greg Amerson's blog.

Neil