从共享点外部托管的网站访问共享点列表

编程入门 行业动态 更新时间:2024-10-26 00:23:11
本文介绍了从共享点外部托管的网站访问共享点列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在从 sharepoint online 2010 外部开发 Web 应用程序.作为应用程序的一部分,我希望允许用户访问文档库中的文档.理想情况下,用户会点击一个选项,这将查询文档库,并为每个满足查询的对象返回一个 JSON 对象,以便在网页中显示为链接.

I'm developing a web application externally from sharepoint online 2010. As part of the application I would like to allow users to access documents from a document library. Ideally users would click on an option, this would query the library for documents, and return a JSON object for each object satisfying the query for display as links in a webpage.

我一直在寻找一种在共享点 2010 外部托管的网站中执行此操作的方法,但我一直无法找到描述如何加载 ECMA 脚本 API 和连接到共享点站点的资源.有谁知道我在哪里可以找到这些信息?

I've been looking for a way to do this in a website hosted externally from sharepoint 2010, but I have been unable to find resources describing how to load the ECMA script API and connect to a sharepoint site. Does anyone know where I can find this information?

感谢您的帮助!

推荐答案

您有多种方法可以实现这一点.开箱即用的选项将使用查询(来自服务器代码或 ajax)您的列表 SVC.如果您不知道,所有列表都有相关的服务来提取信息.

You have several ways to achieve this. The out of the box option would be using queries (from server code or ajax) your list SVC. In case you don't know, all lists have an associated service to pull information.

  • msdn.microsoft/en-us/library/hh134614(v=office.14).aspx
  • www.dotnetmafia/blogs/dotnettipoftheday/archive/2010/01/21/introduction-to-querying-lists-with-rest-and-listdata-svc-in-sharepoint-2010.aspx
  • codeplex spservices 有一个很棒的 js 库,可以帮助您查询共享点.使用此列表,您可以执行以下操作(示例代码取自 codeplex 示例)

    There is a wonderful js library at codeplex, spservices, that helps you to query your sharepoint. With this list you could do something like this (sample code taken from codeplex samples)

    <script language="javascript" type="text/javascript"> $(document).ready(function() { $().SPServices({ operation: "GetListItems", async: false, listName: "Announcements", CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>", completefunc: function (xData, Status) { $(xData.responseXML).SPFilterNode("z:row").each(function() { var liHtml = "<li>" + $(this).attr("ows_Title") + "</li>"; $("#tasksUL").append(liHtml); }); } }); }); </script>

    更多信息,请访问 spservices.codeplex/wikipage?title=GetListItems?请记住,如果列表有安全限制,当您在 sharepoint 外部运行此调用时,您会遇到非常有趣"的身份验证问题,并且它不知道到底是谁在进行调用.因此,作为建议,请考虑在 sharepoint 下运行您的页面.

    More information at spservices.codeplex/wikipage?title=GetListItems? Keep in mind if the list has security restrictions you will run into pretty "interesting" authetication issues as you are running this calls outside sharepoint and it will not know who the hell is making the calls. So, just as a suggestion, consider running your pages under sharepoint.

    更多推荐

    从共享点外部托管的网站访问共享点列表

    本文发布于:2023-08-05 21:36:49,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1308199.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:列表   网站

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!