设为首页 收藏本站
查看: 1262|回复: 0

[经验分享] Sharepoint学习笔记—习题系列--70-573习题解析

[复制链接]

尚未签到

发表于 2015-9-27 08:46:20 | 显示全部楼层 |阅读模式
  Question15
You are creating an application page that will open a dialog box.

The dialog box uses a custom master page. You write the following code segment. (Line numbers are included for reference only.)

01 <script type="text/javascript">

02   function DialogCallback(dialogResult, returnValue)

03   {

04   }

05   function OpenEditDialog(id)

06   {

07     var options = {

08              url:"http://intranet/_layouts/MsgToShow.aspx,

09              width: 300,

10              height: 300,

11              dialogReturnValueCallback: DialogCallback

12     };

13     SP.UI.ModalDialog.showModalDialog(options);

14   }

15 </script>

You need to ensure that the code opens the dialog box.

What should you do?

  A. Add a script link that references SP.js.
B. Add a script link that references SharePoint.Dialog.js.
C. At line 13, change showModalDialog to openDialog.
D. At line 13, change showModalDialog to commonModalDialogOpen.

解析:
本题在代码段没有什么错误,所以要保证能正确显示ModalDialog窗口,就只能是SP.js的引入了。参考  Question 13,所以本题没有太多讲解,正确答案应该是A

Question16
You plan to add a custom tab to the Ribbon in a SharePoint Web application.

You create a custom Feature that contains an Elements.xml file.

You need to ensure that the custom tab only appears in the document libraries of the Web application.

Which code segment should you add to the Custom Action node of the Elements.xml file?

A. Location="DocumentLibrary"
B. RegistrationId="101"
C. RegistrationType="List"
D. ShowInLists="false"
  
  解析:
  本题的题意是要你设置你添加的Tab容器的显示时机。也即它只与Document Libraries关联显示。
  先看一段Ribbon的Element.xml样例



<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Id="DemoHelloWorldButton"
RegistrationType="List"
RegistrationId="101"
Location="CommandUI.Ribbon">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition
Location="Ribbon.Documents.New.Controls._children">
<Button
Id="Ribbon.Documents.New.Controls.DemoHelloWorldButton"
Alt="Hello World Ribbon Button"
Sequence="10"
Image32by32="/_layouts/images/PPEOPLE.GIF"
Command="Demo_HelloWorld"
LabelText="Hello World Demo"
TemplateAlias="o2"/>
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler
Command="Demo_HelloWorld"
CommandAction="javascript:alert('Hello World!');" />
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
</Elements>
  
选项A. Location="DocumentLibrary" 表达是错误的。
CustomAction元素的Location 属性告知 CustomAction 在何处应用自定义项(即此元素内的所有自定义内容)。下表就是此属性相关选项的取值及说明:


                    值



                              说明



CommandUI.Ribbon



对于指定的 RegistrationId,自定义项出现在任何地方。



CommandUI.Ribbon.ListView



当存在列表视图 Web 部件时出现自定义项。



CommandUI.Ribbon.EditForm



自定义项出现在编辑表单上。



CommandUI.Ribbon.NewForm



自定义项出现在新建表单上。



CommandUI.Ribbon.DisplayForm



自定义项出现在显示表单上。



选项B. RegistrationId="101". 用于指定与此操作(CustomAction )关联的列表或项内容类型的标识符,或文件类型或编程标识符 (ProgID)。 关于它们的含义请参见   Sharepoint学习笔记—Ribbon系列-- Reference :List definitions Type and BaseType ,此设置为101 也即我们自定义的CustomAction与 Document library //文档库 进行关联。也就是说当我们选择Sharepoint网站的某个DocumentLibrary List时,就会出现我们自下定义的CustomAction选项卡(Tab),也就是说,在CustomAction的相关属性设置中,我们解决了它显示的“时机”问题。
选项C. RegistrationType="List" ,RegistrationType属性: 用于给每项操作指定注册附件。可能的值包括:None,ContentType,FileType,List,ProgId
选项D. ShowInLists="false" 此属性已经弃用,不应该再使用。可选属性,类型为 Boolean。如果仅在用于管理内容类型的页上显示针对列表的自定义操作,则为 TRUE。默认值为 FALSE。
  所以本题目正确选项应该是B
  参考:
http://techtrainingnotes.blogspot.com/2008/01/sharepoint-registrationid-list-template.html

http://msdn.microsoft.com/en-us/library/ff630938.aspx

  http://msdn.microsoft.com/en-us/library/ms460194.aspx
  
  Question 17
You have one Web application that contains several SharePoint site collections.

You need to create a Feature that adds a custom button to the Documents tab on the Ribbon of one site collection only.

What should you do?

A. Create a new Feature. In a new <CommandUIDefinition> node, specify the location of Ribbon.Tabs._children.
B. Create a new Feature. In a new <CommandUIDefinition> node, specify the location of Ribbon.Documents.Manage.Controls._children.
C. Modify the CMDUI.xml file. In a new <CommandUIDefinition> node, specify the location of Ribbon.Tabs._children.
D. Modify the CMDUI.xml file. In a new <CommandUIDefinition> node, specify the location of Ribbon.Documents.Manage.Controls._children.
   解析:
  本题的题意要是要实现在”某一个” Site Collection中的Ribbonr的Document Tab上添加一个用户自定义的按钮。所以是关于Ribbon的实现的。由要求可知 1. 此按钮并非”通用”的,即适用于所有的Site Collection. 2. 此按钮要出现在Document Tab中。
  明确了要求,我们就可以首先排除C.D了,因为CMDUI.xml中定义的均是Out-Of-Box的Ribbon元素,也即在这里所作的改变均会显示到所有的相关的Site Collection中,具有”通用”性。达不到只针对某个Site Collection的要求。
  然后就是Document Tab的位置要求,本题位置要求应该是Ribbon.Documents. 即选项B符合要求。
  至于选项A,是根本不存在Ribbon.Tabs这样的位置定义的。
  所以本题目正确选项应该是B
  参考:
  http://msdn.microsoft.com/zh-cn/library/ee537543(v=office.14).aspx
  http://www.cnblogs.com/wsdj-ITtech/tag/Ribbon/
http://howtosharepoint.blogspot.com/2010/06/ribbon-basics.html


Question 18

You have a SharePoint site that contains 10 lists.

You need to prevent a list named List1 from appearing on the Quick Launch navigation bar.

What should you configure?

A. the Hidden property of List1
B. the Navigation.QuickLaunch.Parent.IsVisible property of the site
C. the OnQuickLaunch property of List1
D. the QuickLaunchEnabled property of the site
   解析:
  选项A. List的Hidden Property用于设置这个List是否在Documents page, Lists page, Quick Launch bar, Modify Site Content page, 或者 Add Column page上显示.请注意,它控制的不仅是Quick Launch Bar上是否显示。
  选项B. 看表达就知道它控制的并不是List,而是QuickLlaunch对象自身的元素。而且是否有此属性我还并没验证。
  选项C. 此属性用于设置指定的List是否在HomePage的Quick Launch 上出现,这正是我们需要的。
  选项D. 用于设置Quick Launch area 是否在Web Site上能用(显示与否)。
  所以本题目正确选项应该是C
  参考
http://msdn.microsoft.com/zh-cn/library/microsoft.sharepoint.splist.onquicklaunch.aspx

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splist.onquicklaunch.aspx

  http://msdn.microsoft.com/zh-cn/library/microsoft.sharepoint.spweb.quicklaunchenabled(v=office.12).aspx

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-119295-1-1.html 上篇帖子: SharePoint 2007 条目权限查看工具(SharePointListPermissionView) 下篇帖子: office sharepoint server2007中的简单工作流
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表