/// <summary> /// A method to get all the HTML and CAML configure elements from the configure file ViewHtmlConfigure.xml /// for the UpdateViewHtml2 operation. /// </summary> /// <param name="toolBar">The outer UpdateViewHtml2Toolbar instance.</param> /// <param name="viewHeader">The outer UpdateViewHtml2ViewHeader instance.</param> /// <param name="viewBody">The outer UpdateViewHtml2ViewBody instance.</param> /// <param name="viewFooter">The outer UpdateViewHtml2ViewFooter instance.</param> /// <param name="viewEmpty">The outer UpdateViewHtml2ViewEmpty instance.</param> /// <param name="rowLimitExceeded">The outer UpdateViewHtml2RowLimitExceeded instance.</param> protected void GetHtmlConfigure( out UpdateViewHtml2Toolbar toolBar, out UpdateViewHtml2ViewHeader viewHeader, out UpdateViewHtml2ViewBody viewBody, out UpdateViewHtml2ViewFooter viewFooter, out UpdateViewHtml2ViewEmpty viewEmpty, out UpdateViewHtml2RowLimitExceeded rowLimitExceeded) { toolBar = new UpdateViewHtml2Toolbar(); viewHeader = new UpdateViewHtml2ViewHeader(); viewBody = new UpdateViewHtml2ViewBody(); viewFooter = new UpdateViewHtml2ViewFooter(); viewEmpty = new UpdateViewHtml2ViewEmpty(); rowLimitExceeded = new UpdateViewHtml2RowLimitExceeded(); bool fileExisted = File.Exists("ViewHtmlConfigure.xml"); this.Site.Assume.IsTrue(fileExisted, "The file \"ViewHtmlConfigure.xml\" should exist in current path."); // If the view HTML configure file exists, get the HTML or CAML content from the configuration. if (fileExisted) { toolBar.Toolbar = new ToolbarDefinition(); viewHeader.ViewHeader = new UpdateViewHtml2ViewHeaderViewHeader(); viewBody.ViewBody = new UpdateViewHtml2ViewBodyViewBody(); viewFooter.ViewFooter = new UpdateViewHtml2ViewFooterViewFooter(); viewEmpty.ViewEmpty = new UpdateViewHtml2ViewEmptyViewEmpty(); rowLimitExceeded.RowLimitExceeded = new UpdateViewHtml2RowLimitExceededRowLimitExceeded(); // Load the ViewHtmlConfigure.xml into XmlDocument. XmlDocument doc = new XmlDocument(); doc.Load("ViewHtmlConfigure.xml"); // Get all the configured HTML or CAML elements. toolBar.Toolbar.Any = this.GetConfiguredElements("Toolbar", doc); viewHeader.ViewHeader.Any = this.GetConfiguredElements("ViewHeader", doc); viewBody.ViewBody.Any = this.GetConfiguredElements("ViewBody", doc); viewFooter.ViewFooter.Any = this.GetConfiguredElements("ViewFooter", doc); viewEmpty.ViewEmpty.Any = this.GetConfiguredElements("ViewEmpty", doc); rowLimitExceeded.RowLimitExceeded.Any = this.GetConfiguredElements("RowLimitExceeded", doc); } }
/// <summary> /// This operation is used to obtain details of a specified list view of the specified list, including display properties in CAML and HTML. /// </summary> /// <param name="listName">Specify a list on the server.</param> /// <param name="viewName">Specify a list view on the server.</param> /// <param name="viewProperties">Specify the properties of a list view on the server.</param> /// <param name="toolbar">Specify the rendering of the toolbar of a list.</param> /// <param name="viewHeader">Specify the rendering of the header, or the top of a list view page.</param> /// <param name="viewBody">Specify the rendering of the main, or the middle portion of a list view page.</param> /// <param name="viewFooter">Specify the rendering of the footer, or the bottom of a list view page.</param> /// <param name="viewEmpty">Specify the message to be displayed when no items are in a list view.</param> /// <param name="rowLimitExceeded">Specify rendering of additional items when the number of items exceeds the value.</param> /// <param name="query">Include the information that affects how a list view displays the data.</param> /// <param name="viewFields">Specify the fields included in a list view.</param> /// <param name="aggregations">The type of the aggregation.</param> /// <param name="formats">Specify the row and column formatting of a list view.</param> /// <param name="rowLimit">Specify whether a list supports displaying items page-by-page, and the count of items a list view displays per page.</param> /// <param name="openApplicationExtension">Specify what kind of application to use to edit the view.</param> /// <returns>The result returns a View that the type is ViewDefinition if the operation succeeds</returns> public UpdateViewHtml2ResponseUpdateViewHtml2Result UpdateViewHtml2( string listName, string viewName, UpdateViewHtml2ViewProperties viewProperties, UpdateViewHtml2Toolbar toolbar, UpdateViewHtml2ViewHeader viewHeader, UpdateViewHtml2ViewBody viewBody, UpdateViewHtml2ViewFooter viewFooter, UpdateViewHtml2ViewEmpty viewEmpty, UpdateViewHtml2RowLimitExceeded rowLimitExceeded, UpdateViewHtml2Query query, UpdateViewHtml2ViewFields viewFields, UpdateViewHtml2Aggregations aggregations, UpdateViewHtml2Formats formats, UpdateViewHtml2RowLimit rowLimit, string openApplicationExtension) { UpdateViewHtml2ResponseUpdateViewHtml2Result updateViewHtml2Result; try { updateViewHtml2Result = this.viewssProxy.UpdateViewHtml2( listName, viewName, viewProperties, toolbar, viewHeader, viewBody, viewFooter, viewEmpty, rowLimitExceeded, query, viewFields, aggregations, formats, rowLimit, openApplicationExtension); // Used to validate the transport requirements. this.CaptureTransportRelatedRequirements(); // Used to validate the UpdateViewHtml2 schema requirements. this.ValidateUpdateViewHtml2Result(updateViewHtml2Result); } catch (SoapException soapException) { this.Site.Log.Add( LogEntryKind.Debug, @"There is an exception generated when calling [UpdateViewHtml2] method:\r\n{0}", soapException.Detail.InnerXml); // Used to validate the transport requirements. this.CaptureTransportRelatedRequirements(); // Used to validate the schema of SoapFault. this.ValidateSOAPFaultDetails(soapException.Detail); throw; } return(updateViewHtml2Result); }
/// <summary> /// This operation is used to obtain details of a specified list view of the specified list, including display properties in CAML and HTML. /// </summary> /// <param name="listName">Specify a list on the server.</param> /// <param name="viewName">Specify a list view on the server.</param> /// <param name="viewProperties">Specify the properties of a list view on the server.</param> /// <param name="toolbar">Specify the rendering of the toolbar of a list.</param> /// <param name="viewHeader">Specify the rendering of the header, or the top of a list view page.</param> /// <param name="viewBody">Specify the rendering of the main, or the middle portion of a list view page.</param> /// <param name="viewFooter">Specify the rendering of the footer, or the bottom of a list view page.</param> /// <param name="viewEmpty">Specify the message to be displayed when no items are in a list view.</param> /// <param name="rowLimitExceeded">Specify rendering of additional items when the number of items exceeds the value.</param> /// <param name="query">Include the information that affects how a list view displays the data.</param> /// <param name="viewFields">Specify the fields included in a list view.</param> /// <param name="aggregations">The type of the aggregation.</param> /// <param name="formats">Specify the row and column formatting of a list view.</param> /// <param name="rowLimit">Specify whether a list supports displaying items page-by-page, and the count of items a list view displays per page.</param> /// <param name="openApplicationExtension">Specify what kind of application to use to edit the view.</param> /// <returns>The result returns a View that the type is ViewDefinition if the operation succeeds</returns> public UpdateViewHtml2ResponseUpdateViewHtml2Result UpdateViewHtml2( string listName, string viewName, UpdateViewHtml2ViewProperties viewProperties, UpdateViewHtml2Toolbar toolbar, UpdateViewHtml2ViewHeader viewHeader, UpdateViewHtml2ViewBody viewBody, UpdateViewHtml2ViewFooter viewFooter, UpdateViewHtml2ViewEmpty viewEmpty, UpdateViewHtml2RowLimitExceeded rowLimitExceeded, UpdateViewHtml2Query query, UpdateViewHtml2ViewFields viewFields, UpdateViewHtml2Aggregations aggregations, UpdateViewHtml2Formats formats, UpdateViewHtml2RowLimit rowLimit, string openApplicationExtension) { UpdateViewHtml2ResponseUpdateViewHtml2Result updateViewHtml2Result; try { updateViewHtml2Result = this.viewssProxy.UpdateViewHtml2( listName, viewName, viewProperties, toolbar, viewHeader, viewBody, viewFooter, viewEmpty, rowLimitExceeded, query, viewFields, aggregations, formats, rowLimit, openApplicationExtension); // Used to validate the transport requirements. this.CaptureTransportRelatedRequirements(); // Used to validate the UpdateViewHtml2 schema requirements. this.ValidateUpdateViewHtml2Result(updateViewHtml2Result); } catch (SoapException soapException) { this.Site.Log.Add( LogEntryKind.Debug, @"There is an exception generated when calling [UpdateViewHtml2] method:\r\n{0}", soapException.Detail.InnerXml); // Used to validate the transport requirements. this.CaptureTransportRelatedRequirements(); // Used to validate the schema of SoapFault. this.ValidateSOAPFaultDetails(soapException.Detail); throw; } return updateViewHtml2Result; }