[gatein-issues] [JBoss JIRA] (GTNWSRP-269) Problem with resourceId while rendering bookingMapPortlet over WSRP

Matt Wringe (Commented) (JIRA) jira-events at lists.jboss.org
Mon Nov 28 16:30:40 EST 2011


    [ https://issues.jboss.org/browse/GTNWSRP-269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646094#comment-12646094 ] 

Matt Wringe commented on GTNWSRP-269:
-------------------------------------

Ok, its an incompatibility issue with the google javascript used in the gmap api. Its expecting '&' instead of '&amp'. So when we pass it '&amp' it will use this value in the URL instead of properly encoding it (I don't know why they don't escape it themselves). WSRP is doing everything properly here.

>From http://code.google.com/apis/maps/documentation/staticmaps/index.html:
"Whether using HTTP or HTTPS, certain URL parameters are required while some are optional. As is standard in URLs, all parameters are separated using the ampersand (&) character"

So we need to change the seamBooking example to get around this issue. The seamBookingPortlet/src/main/webapp/hotel-map.xhtml specifies the pinImage as:
var pinImage="${resource['/img/gmap-pin1.png']}"

When WSRP creates the resource url with & in it (like it should) it messes up the gmap javascript.

We can either remove the pinImage from the javascript in the xhtml (and have it point to a static reference somewhere, like how the pin shadow is set to http://www.google.com/mapfiles/shadow50.png) or we can add some more logic to the javascript to have it manipulate the url to get it to a point where the gmap javascript will like it.
                
> Problem with resourceId while rendering bookingMapPortlet over WSRP
> -------------------------------------------------------------------
>
>                 Key: GTNWSRP-269
>                 URL: https://issues.jboss.org/browse/GTNWSRP-269
>             Project: GateIn WSRP
>          Issue Type: Bug
>    Affects Versions: 2.1.0-GA
>         Environment: EPP5.2.0 CR01
> seamBooking demo from 2.2.0.GA.EPP520
>            Reporter: Michal Vanco
>            Assignee: Matt Wringe
>             Fix For: 2.1.1-GA
>
>         Attachments: seamBookingMap.txt
>
>
> Problem while serving resource for the portlet: selfv2./portalBookingDemo.bookingMapPortlet
> java.lang.IllegalArgumentException: GetResource needs a valid resource id.
> WSRP and PBR version weren't changed at CR01, that can be potentially caused by other change (& or double & issues at resources).
> And this error wasn't present at 5.2.0 ER06

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the gatein-issues mailing list