[mapguide-users] RE: RE: Save a Web Layout to Session
Jim O'Leary
joleary.public at gmail.com
Thu Mar 22 19:57:09 EDT 2007
Yes, that worked. The third argument must be null. Thank you.
Scott McFarlane wrote:
>
> Hi Jim,
>
> When using SetResource for the Session repository, the third argument
> (header) must be NULL.
>
> - Scott
>
> -----Original Message-----
> From: mapguide-users-bounces at lists.osgeo.org
> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Jim O'Leary
> Sent: Wednesday, March 21, 2007 4:05 PM
> To: mapguide-users at lists.osgeo.org
> Subject: [mapguide-users] RE: Save a Web Layout to Session
>
>
> Yes, I am able to make a new resource identifier this way, and calling
>
> $resourceId->GetRepositoryType();
>
> tells me that the repository type is "Session".
>
> However, passing that resource id to SetResource() gives:
>
> mginvalidargumentexception
>
> The same call with "Library://pathtoWebLayout.WebLayout" does create the
> Web
> Layout in the repository, so I know the content byte source and header
> byte
> source are valid.
>
> There is no indiction in the documentation that you can use setresource to
> save to Session. It appears that you can only save the map to Session.
>
>
>
> Scott McFarlane wrote:
>>
>> To save any resource to the session repository, you simply use
>> SetResource
>> using the following ResourceID syntax:
>>
>> "Session:" + <current session ID> + "//" + <resource name>
>>
>> For example, a web layout stored in the session repository might have the
>> following ResourceID:
>>
>> Session:7f3247f8-0000-1000-8000-000c291ff9df_en//Layout.WebLayout
>>
>> Hope this helps!
>>
>> Scott
>>
>>
>>
>> -----Original Message-----
>> From: mapguide-users-bounces at lists.osgeo.org
>> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Jim O'Leary
>> Sent: Wednesday, March 21, 2007 11:10 AM
>> To: mapguide-users at lists.osgeo.org
>> Subject: [mapguide-users] Save a Web Layout to Session
>>
>>
>> I would like to associate a map with a web layout at runtime. I can do
>> that
>> by extracting the XML of the web layout using GetResourceContent(),
>> replacing the
>> <Map>
>> <ResourceId>
>> content with the path to the map, and then saving the web layout to the
>> repository using SetResource. However, I would like to save the new web
>> layout to the Session, and this doesn't work for SetResource.
>>
>> The Dev Guide indicates that you save a map to Session by
>>
>> $map->Save($resourceService, $mapId);
>>
>> However, there appears to be no MGWebLayout class to do the same for a
>> web
>> layout. Is there a way to save a web layout to session?
>> --
>> View this message in context:
>>
> http://www.nabble.com/Save-a-Web-Layout-to-Session-tf3441428s16610.html#a959
>> 6123
>> Sent from the MapGuide Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
>>
>>
>>
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Save-a-Web-Layout-to-Session-tf3441428s16610.html#a960
> 2044
> Sent from the MapGuide Users mailing list archive at Nabble.com.
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
>
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
--
View this message in context: http://www.nabble.com/Save-a-Web-Layout-to-Session-tf3441428s16610.html#a9626683
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list