Does this Work with the links web part?

Mar 5, 2009 at 9:56 AM
Hi Joe,

I've installed this on my WSS 3.0 installation but I can't seem to get it to work with the links web part?  Am I missing something?  What should I enter in the URL parameter?  Is it ok to leave it blank - I assume that a blank URL will mean that no page will load in the viewer web part until the user clicks on the link in the links web part?

If it helps I'm getting this error if I enable 'Show Page URL'    "Error: Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed."


Thanks for your help.
Regards
Dan
Coordinator
Mar 9, 2009 at 12:51 PM
Dan,

You can't use it with the Links web part.  You can connect a web part with a view of a Links list to the Connectable Page Viewer web part (CPVWP) and specify {URL} as the Page URL in its configuration, but unfortunately the Links list passes both the URL and Description in the same field.  For example, if your Links list had http://www.msn.com as the URL and "MSN" as the description, when you clicked on the radio button for that link, it passes http://www.msn.com, MSN as the URL.  The ", MSN" causes it to be an invalid URL because it mixes in the description.

If you want to use this web part to get an entire URL from a list, create a Custom List with a field to hold your URLs - for example, call the field "URL".  Then drop the list view web part for that list on your page along with this Connectable Page Viewer web part (CPVWP).  In the configuration for the CPVWP, specify {URL} as the Page URL value.

You must specify something in the Page URL field.  If the entire URL is being passed, then just specify the URL field name (or position) in braces.

I am not sure why you would be getting an error with the Show Page URL checked - I have that checked on my WSS 3.0 system and it shows the URL.  I will look into that some more.
Mar 9, 2009 at 2:56 PM
Hi Joe,

Thanks for getting back to me, and continuing to contribute to this project. 

I will indeed try the work around you suggest. However, I noticed your reference to the original source of the Connected Page Viewer web part, looking at the posts for the original thread, I noticed someone else had a workaround for the WSS 3.0 links

Could this code be applied to the current form of the CPVWP?



Miles wrote re: Connected Page Viewer Web Part
on 02-12-2008 7:01 PM
I added this code to make it work with a WSS 3.0 Links List:

public void CellReady(object sender, CellReadyEventArgs cellReadyArgs)

{

if(cellReadyArgs.Cell != null)

{

   //modified to work with wss3.0 link list

   string sURL = cellReadyArgs.Cell.ToString();

   if (sURL.IndexOf(",") > 0)

   {

       sURL = sURL.Substring(0,sURL.IndexOf(","));

   }//

   pageUrl = sURL;

}

}




Regards
Dan
Mar 9, 2009 at 4:34 PM
Hi Joe,

I tried your suggestion, but I'm still getting the same message,  I looked up the message on google and found this,  http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/b5fce062-4a0a-47d8-9af4-2b6d4d107266/

It suggest I should "Change the trust level to full trust and put your DLL in the GAC"  does this mean anything to you?

Regards
Dan

Coordinator
Mar 10, 2009 at 6:31 PM
Dan,

I didn't see that workaround, but I was thinking of doing that exact same thing in my version so it will work with the Links web part.  (Until you pointed it out, I didn't realize the Links web part did that.)

I will get that change incorporated shortly.

Coordinator
Mar 10, 2009 at 6:36 PM
Dan,

I know what changing it to full trust means, but I don't know why that would be necessary.

It does it for you whenever you check Show Page URL, even a non-blank URL?
Coordinator
Mar 10, 2009 at 6:53 PM
Dan,

Are you sure you installed the web part with the -globalinstall option?

That should have put the assembly in the GAC and therefore run with full trust.
Mar 11, 2009 at 10:08 AM
Hi Joe,

I confess I missed the -force & -globalinstall switches,  The command I used was   "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm" -o addwppack -filename "E:\Installs\ConnectedPageViewer_Deployment.CAB"

I've now removed the install, with this command "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm" -o deletewppack -name ConnectedPageViewer_deployment.cab
and reinstalled with this command, "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm" -force -globalinstall -o addwppack -filename "E:\Installs\ConnectedPageViewer_Deployment.CAB"

Now, I'm pleased to say, The Connected page Viewer web park works as described.

Many thanks for your help Joe.  If you are able to add the ability to use the links web part It would be great, But in any case,  Great job, thanks for all your assistance.

Regards
Dan
Coordinator
Mar 12, 2009 at 6:01 PM
Dan,

I posted an update today that will allow you to connect it to a Links list web part.  You need to check the option "Connect to Links List?" in the CPVWP configuration when connected to a Links list.  This will tell it to truncate the URL at the comma.
Mar 13, 2009 at 9:51 AM
Hi Joe, 

I've removed the old CPVWP and installed the new CPVWP using the commands as described in my previous post, However I can't find the option "Connect to Links List?".

Is it in the same place as the URL parameters?

Thanks
Dan
Coordinator
Mar 13, 2009 at 12:12 PM
Dan,

Did you do "iisreset" after you installed?  You need to do that so it reloads the DLL.