FlexListViewer-webpart can be used to display lists of other sites. It does so by reading the contents of the view of the remote list, storing it into a small object-model, serialize it to an XML-stream and transform it to HTML using an xslt.
The stylesheet (xslt) was created to make the list look as must as a regular SharePoint-list as possible. However, sometimes you may desire the list, or possible a column of the list, to be displayed differently. Say you have a list containing all projects that are currently active. For each project you specify its status (good, average, poor), but when viewing the list on the frontpage of you site/area, you don’t want to display “Good“, but you want to render a green image (or a red image when the project’s status is poor). This would look like this:
Out-of-the-box that is only possible by using FrontPage to convert the standard ListViewer-webpart to xslt. Since that would make the page unghosted (an we don’t want that), FlexListViewer would be an alternative. You could modify the xslt it uses, or specify a different xslt.
Because the image is automatically rendered, the project manager that edits the list, can still use the standard form for the list:
To configure FlexListViewer-webpart to support this custom formatting for the column ‘status’, you will have to create a new xslt by copying the original (usually at C:Program FilesCommon FilesMicrosoft Sharedweb server extensionswpresourcesFlexListViewer…) and add logic for the custom formatting (like this). To make it available to FlexListViewer-webpart, you can upload the xslt into a document library on your site. Next you have to configure FlexListViewer-webpart to use the custom xslt by specifying the FULL URL to the xslt.
Because you may want to supply some additional information to the webpart, you can use the “Parameters“. In the example above Param1 and Param2 are used to supply the webpart the display-name of the status-column and the name of the document library that contains the status-images.
To get this running quickly, you can download list-templates for the document library containing the images and the custom xslt and a template for the Project-Status list (both for English WSS-sites).
A new version of the FlexListViewer-webpart is available: v1.5.
It contains several bugfixes and new features:
- Support for LookUp-fields (already available with v1.1)
- Support for Parameters (for xslt)
- Nicer errormessages
Download FlexListViewer 1.5 1.6 >>here<<! (Updated, check here!)
(Robert te Kaat)
23 comments
I don’t mean to sound snarky, but you don’t need to unghost a page to use a Data View Web Part. You can create one on an unghosted page, export the DWP, and import it back to any page you like, including ghosted ones.
Dustin Miller
I mentioned that trick in the first article about FlexListViewer-webpart (https://blogs.infosupport.com/porint/archive/2006/02/17/3837.aspx, first bullet).
However, it’s hard to explain your client to use a trick like that to get things done. It should have been out-of-the-box functionality (I consider any solution that requires unghosting or tricks/hacks non out-of-the-box) to display lists of other sites (shame on you, MS!), but since it’s not, I think FlexListViewer is an acceptable alternative.
Second of all, FlexListViewer allows custom xslt’s. And although that’s possible with FP as well, as far as I know, there’s no trick to keep a page ghosted then.
Robert te Kaat
I may be wrong, but these are my observations after playing around with the functionality of the 1.5 version:
One thing I noticed that may need to be fixed is the fact when you have multiple text choices within a field that is displayed by the web part.
Normally, when you view the list’s page you will see:
Option1; Option 2; Option 3
When viewed through the flexviewer, it ends up being:
;#Option1;#Option2;#Option3;#
On some other texts I actually see the <div> tags. Can those be removed in your next version?
Also, the views created for the lists end up not applying when viewed through the flexviewer.
Also, is there any documentation in regards to the functionality of the flexviewer? Right now I am not sure which parameter is for what (if it matters), and for the most part, I am guessing at what it will do.
Eric Chiang
Multiple select-fields don’t work indeed. I have no idea what happens with HTML-textfields. I thought I tested it, but perhaps it doesn’t work after all.
Modifications to views of document libraries don’t (always) work with FlexListViewer. The OM just doesn’t report all fields of a view for document libraries. For lists it should always work. It always uses the actual view-definition, so no caching or one-time copy is created.
The only thing you need to know is the List View-url. The other properties only need to be set when you want to use a customized xslt. If it requires additional information, you can specify it with the Parameter-fields.
I have no plans for creating any documentation or fixing anything, since it’s provided as-is and it’s not a commercial product.
Robert te Kaat
Does anyone know if this webpart also works to include the related document pictograms?
Rob Scholten
It uses a built-in function of the SharePoint objectmodel to request the icon for the specified document type. For some reasons these sometimes differ from the ones SharePoint displays itself, although a Word-document still gets a Word-icon, just slightly different.
–> Please note that FlexListViewer was intended for use with lists, not document libraries. Therefore you may run into some problems, especially if the doclib contains folders or if its root-folder is not the same as the root-url of the doclib.
Robert te Kaat
Does portal notification works for this great webpart?
shako
The webpart shows the contents of a list/view. Alerts (‘portal notifications’) on that list still work of course. What exactly do need to be alerted on?
robertka
Thank you for answer. Actually needed alerts on various fields of single list. I think about use flexiblelistviewer to read view of needed list and set alert on flexiblelistviewer.
shako
SharePoint sends alerts when items (‘rows’) of a list change (add/update/delete or all of these). So alerts work on row-level, not column-level. When a column (‘field’) is changed, this automatically means the row has changed.
Also important is that alerts work on a list and not on a view of a list. For a more specific alert on a list, you could use the search engine to perform a search on that list and set an alert on the search-results. This is however only possible for SharePoint Portal Server (SPS) and not for Windows SharePoint Services (WSS).
Alerts work on lists, not on webparts. This means that FlexListViewer cannot support alerts in any way. This is not a bug, missing feature, whatever. It just doesn’t make sense (no offence :)).
robertka
Many thanks, robertka. I exactly have SPS. I’ll try to use search engine.
shako
is there any option when configuring the url view, use a relative path to other site in the same portal site? when i try configuring the path to a site in other site in the same portal, the webpart display error, “access denied”, can you help me?
thx
santiago
Sorry santiago, relative paths are not supported. I can imagine you want to use relative paths when creating a template-site of your site. I’ll see if I can include it in a future release of FlexListViewer.
robertka
I’m using SharePoint 2003 Server and managed to create a very nice looking webpart with custom formatting thanks to the FlexListViewer webpart. The data for this webpart and the webpart itself reside in the same site (not area).
I now want to display the same webpart in several areas in my SharePoint site – always accessing the data that resides in the same site. The problem is that I always recieve the following error: “Cannot read the specified Xslt-file. Details: The remote server returned an error: (401) Unauthorized.”. I already checked out the other users comments but nothing helps. The currently logged in user has full access to the data. I also tried to copy the Xslt file to the area where I want to display the webpart. Didn’t help. As soon as I remove the entry in the “Xslt Url” option box, everything works. But the data is not rendered because it then uses the default Xslt file.
For me it seems that everything works fine as long as I use the FlexListViewer webpart in a site. As soon as I use it in an area, I get the 401 problem.
Any idea? Thanks for your support!
Mischa
Mischa Szeker
Hello Mischa,
Nice to hear positive feedback on FlexListViewer 🙂
(can you send me a screenshot? I’m curious of what you created)
It’s behaviour in both WSS and SPS should not differ. Perhaps there are some differences in security configuration? Are you using SSL?
The xslt is loaded using a web-request. If your SSL-certificate is not valid, the browser displays a popup and allows the user to accept the invalid certificate. However, the webpart does not. It will raise an exception.
There are also issues with document libraries of which the rootfolder is not the same as the url of the document library itself. I’ve seen document libraries which URL is something like http://server/site/doclib, but who’s rootfolder is located at http://server/site/doclib/1. Those were all document libraries which were created during site creation (specified in the site definition template). In those cases, I suggest you create a new document library and try using that one.
Good luck!
robertka
Hi Robert, thanks for you answer! I finally managed to solve the the problem: it was a “%20” in the URL for the Xslt file. It seems that FlexListViewer is not able to interpret this correctly. If I replace the “%20” with a normal space, everything works fine! Regards, Mischa
Mischa Szeker
Man what a great tool for wss v2 !! Thanks for making this!!
I ran into a bit of a snag and could use some help.
I am using FlexListViewer in a wss site and told it to look at the SPS Sites page. I created a view called Operations. I copied the url of that SPS view and pasted it into the FlexListViewer in my wss site. It works, but the name of the sites are not links. 🙁 I made sure that the view I created in the SPS Sites includes a clickable link, but they just dont show in the wss site.
Any suggestions?
Donavon
Hi Donavon. Great to hear such enthousiastic users. That’s what makes it worth the effort! 🙂
FlexListViewer can only display information that it receives from the view-data. Enable the “Display XML (…)” setting under Options. This will output the complete XML that is generated from the view-data.
If the URLs of the sites are not included, the FlexListViewer cannot display it (in such a case SharePoint probably uses some hack itself).
If the URLs áre included, then the view-data is probably returned in an unexpected format. In that case you could modify the standard xslt to customize the rendered output of the webpart.
robertka
Hi everyone,
First things first, thanks Robert for the great webpart.
Ok I found a quick fix to the problem with
Example:
Say you have flexlist viewer looking at announcements on a teamsite.
First goto the teamsite
click modify settings and columns on announcements
goto columns section
click body
Allow rich text – click no
Problem solved!!
I would suspect this can be done for any other webpart causing this similar problem.
Donavon
Hi Robert,
I’ve tried to download the list-templates, but it seems the hyperlinks don’t work.
Is it possible to re-post the templates ?
Thanks!
Leonie
Sorry, but I’m afraid those files are lost 4ever. Maybe some other commenter downloaded the files and can supply them. You could also modify the xslt yourself. The link to the image containing sample code still seems to work: https://blogs.infosupport.com/images/blogs_infosupport_com/porint/134/o_Custom_XsltCode.GIF
robertka
Many thanks! It worked perfectly on my blog
share point
Hi Robert,
Thanks for such a fanatastic tool. I was searching for some web part that would enable us to show lists from other sites in portal as well.
I have question though. Can I display publishing images as well using Flexlist web part.
Regards,
RK
RK