与文档库浏览器 Web 部件通信
背景
我的任务是在 SharePoint 中显示应可单击的流程图图像。 想象一下 html 中的图像映射。 某些区域会将您带到其他流程图图像,而其他区域则会弹出一个窗口。
“连接”到每个流程图的是一组文档。 这些文档存储在文档库中。 文档库中的每个文件夹都有一个流程图。 文档应显示在图像旁边。 单击图像或文件夹以在层次结构中导航的人还应该能够上传、下载和删除文档。
问题
最简单的解决方案是什么?
到目前为止,我的想法
是创建一个自定义 Web 部件,将其添加到文档库浏览器(MOSS 2007 中的默认浏览器)之上。 此 Web 部件读取一些 xml 文件,指出要显示的图像以及可单击的区域。 它侦听来自文档库的某种事件,例如单击浏览器中的文件夹,或者读取当前 URL 以了解当前位于文件夹层次结构中的位置,并从中显示正确的流程图图像。 单击图像时,Web 部件会更新图像并通知文档库进行相应更新。
这可行吗? 我是不是走错了路? 如何与文档库通信?
谢谢,马丁
Background
My task is to, in SharePoint, show an image of a process map which should be clickable. Think of an imagemap in html. Some areas take you to other process map images and other brings up a pop-up window.
"Connected" to each process map is a set of documents. These documents are stored in a document library. There are one process map for each folder in the document library. The documents should be shown next to the image. The person clicking either the image or a folder to navigate in the hierarchy should also be able to upload, download and delete the documents.
Question
What would be the easiest solution for this?
My thoughts
... so far is to create a custom web part which I add above the document library browser (the default one in MOSS 2007). This web part reads some xml file pointing out the image to show and the areas which is to be clickable. It listens for some kind of events from the document library, like clicks on folders in the browser or it reads the current URL to know where in the folder hierarchy we are currently, and from that show the correct process map image. When the image is clicked, the web part updates the image and tells the document library to update accordingly.
Is this feasible? Am I on the wrong track? How do I communicate with a document library?
Thanks, Martin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我的想法是,您创建一个显示图像映射的 Web 部件,并将适当的条件输出(提供程序)到另一个使用它并显示文档库中的文件的 Web 部件。
您可以通过创建自己的自定义 Web 部件来实现此目的,该部件显示基于 CAML 查询的文档库。 每个图像都会向文档库 Web 部件发送不同的 CAML 查询。
我希望这有帮助。 如果您已经解决了此问题,请提供有关如何解决此问题的信息。
谢谢
My thoughts are that you create a web part that displays your image map and outputs(provider) the appropriate criteria to a another web part that consumes it and displays the files in a document library.
You can achieve this by creating your own custom webpart that displays a document library based on a CAML query. Each Images sends a different CAML query to the document library webpart.
I hope this helps. Please provide information on how you solved this problem if you have already done so.
Thanks
我来这里很久了...实际上解决了这个问题。
我们创建了两个 Web 部件,一个用于流程导航,另一个用于过滤文档库中的文档。
用于流程导航的 Web 部件实际上只是一个在 URL 中查找特定查询参数并向其添加“.html”的 Web 部件。 然后在文档库中查找该文档。 如果找到,则该文档将显示在 iframe 内。 简单的!
html 文档由 Visio 生成并导出为 html,然后上传到 SharePoint。 Visio 文档中的链接通过查询驱动应用程序。
显示相应文档的 Web 部件还会在 URL 中查找特定查询,然后通过 IfilterProvider 接口将筛选参数发送到文档库。 我在 MSDN 上抓取了这个示例 IFilterProvider 并使其在 URL 中查找参数,然后使控件对用户不可见。
这是非常简单的解决方案,尽管客户需要投入大量工作才能将他们的公司流程纳入其中。 而且它很容易出错,而且可能很容易对数据进行更改。
Long since I've been here... Actually solved this one.
We created two web parts, one for process navigation and one for filtering documents in the document library.
The web part for process navigation is actually just a web part that looks for a specific query parameter in the URL and adds ".html" to it. Then looks for that document in a document library. If found then this document is shown inside an iframe. Simple!
The html documents are produced by Visio and exported to html, then uploaded to SharePoint. The links in the Visio document drives the application with queries.
The web part that shows the corresponding documents also looks for a specific query in the URL then sends filterparameters to the document library through the IfilterProvider interface. I snatched this example IFilterProvider at MSDN and made it look in the URL for parameters and then made the controls invisible to the user.
Really simple solution, though the customer needs to put in a lot of work to incorporate their company processes into it. And it is somewhat error prone and probably a sucker to make changes to data-wise.