EndUserSharePoint 2010 » SharePoint 2010 http://www.endusersharepoint.com/EUSP2010 Just another WordPress weblog Tue, 26 Jun 2012 13:21:30 +0000 http://wordpress.org/?v=2.9.2 en hourly 1 Introduction to SharePoint 2010 – Part 5 (Screencast) http://www.endusersharepoint.com/EUSP2010/2010/08/27/introduction-to-sharepoint-2010-part-5-screencast/ http://www.endusersharepoint.com/EUSP2010/2010/08/27/introduction-to-sharepoint-2010-part-5-screencast/#comments Fri, 27 Aug 2010 14:00:36 +0000 Asif Rehmani http://www.endusersharepoint.com/EUSP2010/?p=1053 This entry is part of a series, Introduction to SharePoint 2010»

Guest Author: Asif Rehmani – SharePoint Server MVP, MCT
SharePoint eLearning

This is the fifth of the free videos. Feel free to download and distribute freely.

 

Creating and Customizing a SharePoint Page

This video shows a detailed demonstration of how to create and customize SharePoint pages using the browser. Many of the options in the ribbon are explored. First, a new page is created on the site then it is customized by adding text, table, image, list, and links. Also, it is demonstrated how to use Wiki linking to connect to content on your site.

Guest Author: Asif Rehmani – SharePoint Server MVP, MCT
SharePoint eLearning

Asif has over 10 years of training and consulting experience in the IT industry. He has been training and consulting on primarily SharePoint technologies for over 4 years. He is a SharePoint Server MVP and MCT.

Asif is the co-author of the book Professional SharePoint Designer 2007 by Wrox publications. He has also been a speaker on SharePoint topics at several conferences over the years including Microsoft’s SharePoint Conference, SharePoint Connections, Advisor Live, and Information Workers Conference.

Asif runs a SharePoint eLearning website (http://www.sharepoint-elearning.com) which provides dozens of SharePoint Video Tutorials. He was the co-founder and is currently one of the active leaders of the Chicago SharePoint User Group.

]]>
http://www.endusersharepoint.com/EUSP2010/2010/08/27/introduction-to-sharepoint-2010-part-5-screencast/feed/ 1
Introduction to SharePoint 2010 – Part 4 (Screencast) http://www.endusersharepoint.com/EUSP2010/2010/08/26/introduction-to-sharepoint-2010-part-4-screencast/ http://www.endusersharepoint.com/EUSP2010/2010/08/26/introduction-to-sharepoint-2010-part-4-screencast/#comments Thu, 26 Aug 2010 14:00:13 +0000 Asif Rehmani http://www.endusersharepoint.com/EUSP2010/?p=1050 This entry is part of a series, Introduction to SharePoint 2010»

Guest Author: Asif Rehmani – SharePoint Server MVP, MCT
SharePoint eLearning

This is the fourth of the free videos. Feel free to download and distribute freely.

 

Changing the Theme of a Site

A Site’s Theme provides the look and feel of a site. The colors, fonts, images can all be changed by applying a new Theme to a site. Themes are packages of styles and images that can be applied to a site. Keep in mind that Theme is specific to a site and is not inherited by its subsite. This video shows how you can customize a Theme using the browser and then apply it to a site.

Guest Author: Asif Rehmani – SharePoint Server MVP, MCT
SharePoint eLearning

Asif has over 10 years of training and consulting experience in the IT industry. He has been training and consulting on primarily SharePoint technologies for over 4 years. He is a SharePoint Server MVP and MCT.

Asif is the co-author of the book Professional SharePoint Designer 2007 by Wrox publications. He has also been a speaker on SharePoint topics at several conferences over the years including Microsoft’s SharePoint Conference, SharePoint Connections, Advisor Live, and Information Workers Conference.

Asif runs a SharePoint eLearning website (http://www.sharepoint-elearning.com) which provides dozens of SharePoint Video Tutorials. He was the co-founder and is currently one of the active leaders of the Chicago SharePoint User Group.

]]>
http://www.endusersharepoint.com/EUSP2010/2010/08/26/introduction-to-sharepoint-2010-part-4-screencast/feed/ 0
Introduction to SharePoint 2010 – Part 3 (Screencast) http://www.endusersharepoint.com/EUSP2010/2010/08/25/introduction-to-sharepoint-2010-part-3-screencast/ http://www.endusersharepoint.com/EUSP2010/2010/08/25/introduction-to-sharepoint-2010-part-3-screencast/#comments Wed, 25 Aug 2010 14:00:22 +0000 Asif Rehmani http://www.endusersharepoint.com/EUSP2010/?p=1045 This entry is part of a series, Introduction to SharePoint 2010»

Guest Author: Asif Rehmani – SharePoint Server MVP, MCT
SharePoint eLearning

This is the third of the free videos. Feel free to download and distribute freely.

 

Change the Title, Description, URL and Icon for the site

If you are the administrator of the site, it is easy for you to change the title, description, URL and icon for the site. However, there are some gotchas that you should be aware of when doing this. Things such as the impact of changing the URL, where do you store the site’s logo and more is explored in this video.

Guest Author: Asif Rehmani – SharePoint Server MVP, MCT
SharePoint eLearning

Asif has over 10 years of training and consulting experience in the IT industry. He has been training and consulting on primarily SharePoint technologies for over 4 years. He is a SharePoint Server MVP and MCT.

Asif is the co-author of the book Professional SharePoint Designer 2007 by Wrox publications. He has also been a speaker on SharePoint topics at several conferences over the years including Microsoft’s SharePoint Conference, SharePoint Connections, Advisor Live, and Information Workers Conference.

Asif runs a SharePoint eLearning website (http://www.sharepoint-elearning.com) which provides dozens of SharePoint Video Tutorials. He was the co-founder and is currently one of the active leaders of the Chicago SharePoint User Group.

]]>
http://www.endusersharepoint.com/EUSP2010/2010/08/25/introduction-to-sharepoint-2010-part-3-screencast/feed/ 0
Introduction to SharePoint 2010 – Part 2 (Screencast) http://www.endusersharepoint.com/EUSP2010/2010/08/24/introduction-to-sharepoint-2010-part-2-screencast/ http://www.endusersharepoint.com/EUSP2010/2010/08/24/introduction-to-sharepoint-2010-part-2-screencast/#comments Tue, 24 Aug 2010 14:00:55 +0000 Asif Rehmani http://www.endusersharepoint.com/EUSP2010/?p=1041 This entry is part of a series, Introduction to SharePoint 2010»

Guest Author: Asif Rehmani – SharePoint Server MVP, MCT
SharePoint eLearning

This is the second of the free videos. Feel free to download and distribute freely.

Exploring a SharePoint 2010 Site

This video explores the makeup of a SharePoint site. The Quick Launch, Ribbon and Content Area of the site pages are discussed. Also, the navigation scheme of the sites is explored.

Guest Author: Asif Rehmani – SharePoint Server MVP, MCT
SharePoint eLearning

Asif has over 10 years of training and consulting experience in the IT industry. He has been training and consulting on primarily SharePoint technologies for over 4 years. He is a SharePoint Server MVP and MCT.

Asif is the co-author of the book Professional SharePoint Designer 2007 by Wrox publications. He has also been a speaker on SharePoint topics at several conferences over the years including Microsoft’s SharePoint Conference, SharePoint Connections, Advisor Live, and Information Workers Conference.

Asif runs a SharePoint eLearning website (http://www.sharepoint-elearning.com) which provides dozens of SharePoint Video Tutorials. He was the co-founder and is currently one of the active leaders of the Chicago SharePoint User Group.

]]>
http://www.endusersharepoint.com/EUSP2010/2010/08/24/introduction-to-sharepoint-2010-part-2-screencast/feed/ 0
Introduction to SharePoint 2010 – Part 1 (Screencast) http://www.endusersharepoint.com/EUSP2010/2010/08/23/introduction-to-sharepoint-2010-part-1-screencast/ http://www.endusersharepoint.com/EUSP2010/2010/08/23/introduction-to-sharepoint-2010-part-1-screencast/#comments Mon, 23 Aug 2010 14:00:36 +0000 Asif Rehmani http://www.endusersharepoint.com/EUSP2010/?p=1036 This entry is part of a series, Introduction to SharePoint 2010»

Guest Author: Asif Rehmani – SharePoint Server MVP, MCT
SharePoint eLearning

Over the next few days, I will be posting a few free videos that we have made available at SharePoint-Videos.com to download. These are beginner level SharePoint 2010 videos to help folks to quickly ramp up on the new platform. Feel free to download and distribute freely.

Creating a SharePoint 2010 Site

This video shows a couple of different ways of how you can create a site within a site collection.

Guest Author: Asif Rehmani – SharePoint Server MVP, MCT
SharePoint eLearning

Asif has over 10 years of training and consulting experience in the IT industry. He has been training and consulting on primarily SharePoint technologies for over 4 years. He is a SharePoint Server MVP and MCT.

Asif is the co-author of the book Professional SharePoint Designer 2007 by Wrox publications. He has also been a speaker on SharePoint topics at several conferences over the years including Microsoft’s SharePoint Conference, SharePoint Connections, Advisor Live, and Information Workers Conference.

Asif runs a SharePoint eLearning website (http://www.sharepoint-elearning.com) which provides dozens of SharePoint Video Tutorials. He was the co-founder and is currently one of the active leaders of the Chicago SharePoint User Group.

]]>
http://www.endusersharepoint.com/EUSP2010/2010/08/23/introduction-to-sharepoint-2010-part-1-screencast/feed/ 0
Client Side AJAX Applications in SharePoint 2010 – Part 7: Live Bindings http://www.endusersharepoint.com/EUSP2010/2010/07/12/client-side-ajax-applications-in-sharepoint-2010-%e2%80%93-part-7-live-bindings/ http://www.endusersharepoint.com/EUSP2010/2010/07/12/client-side-ajax-applications-in-sharepoint-2010-%e2%80%93-part-7-live-bindings/#comments Mon, 12 Jul 2010 14:00:48 +0000 Lee Richardson http://www.endusersharepoint.com/EUSP2010/?p=979 This entry is part of a series, Client Side AJAX Applications in SharePoint 2010»

Guest Author: Lee Richardson
http://rapidapplicationdevelopment.blogspot.com/

ASP.Net AJAX Templating is a compelling new client side technology from Microsoft that allows developers to more quickly build responsive and maintainable AJAX applications.  Because ASP.Net AJAX Templating and SharePoint 2010 both support the oData protocol they are a powerful combination.  This post in the series will focus on saving data back to SharePoint using the ASP.Net AJAX templating live binding syntax.

One-Way, Two-Way, Live!

The read-only {{ [FieldName] }} type template syntax we’ve explored previously is far more maintainable than string concatenation, which is the primary alternative to converting JSON data into HTML.  But where ASPNet AJAX Templating really shines is in saving data back to SharePoint (or any oData provider for that matter).  The syntax is called live binding and it comes in two flavors: two-way, and one-way data binding.  We’ll explore two-way data binding first.

In order to implement two-way data binding we simply place an INPUT element on the page and set its value to { binding [FieldName] }.  When it renders, the templating engine will replace the binding syntax with the current JSON object, just as it did with one-way binding.  But now when the user changes the value, the templating engine will automatically update the in-memory JSON objects behind the scenes.

So if we replace the master-details popup we wrote previously with live bindings like this:

<div id="userStoryDetails" class="sys-template">
    <table class="ms-formtable" width="100%">
        <tr>
            <td class="ms-formlabel" width="190">Title:</td>
            <td class="ms-formbody">
              <input type="text" sys:value="{ binding Title }" />
            </td>
        </tr>
        ...

Then the user can change the title.  But it won’t be too impressive yet because they won’t see the results of their changes in the user story cards.  We can fix that by replacing the titles of the cards with the one-way live binding syntax:

<div class="userStoryTitle">
    { binding Title }
    <span class="userStoryButtons">
    ...

Note how the one-way live binding syntax above looks identical to the two-way binding syntax.  That’s because ASP.Net AJAX Templating automatically uses two-way binding when the binding is located in an input form element. 

Our popup now looks like this:

When we mouse out of any field with two way data binding any elements on the page with one-way binding automatically reflect the change.

Saving to SharePoint

What we have so far is nice, but as soon as the user refreshes the page the values are reverted.  That’s because we never saved the values back to SharePoint.  Fortunately this is extremely easy to do with a call to dataContext.saveChanges(). 

We want the save to occur when the user clicks the OK button.  Assuming we pass in the function onDialogClose to the dialogReturnValueCallback parameter when we called SP.UI.ModalDialog.showModalDialog, then our code would look like this:

function onDialogClose(dialogResult, returnValue) {
	if (dialogResult == SP.UI.DialogResult.OK) {
		dataContext.saveChanges();
	}
}

That’s it!  The value is saved back to SharePoint and when we refresh the page the value has been updated.  But what’s going on behind the scenes?

Batch Processing

If we open up Fiddler to watch the HTTP traffic and click OK, we’ll see a post to _vti_bin/ListData.svc/$batch.  The post data looks like this:

--batch_e9ea-1b95-0f95
Content-Type: multipart/mixed;boundary=changeset_973c-961a-5b1e

--changeset_973c-961a-5b1e
Content-Type: application/http
Content-Transfer-Encoding: binary

MERGE http://localhost/Demo/_vti_bin/ListData.svc/UserStories(12) HTTP/1.1
If-Match: W/"10"
Host: nic-lee7
Accept: application/json
Accept-Charset: utf-8
Content-Type: application/json;charset=utf-8

{
    "__metadata": {
    "uri":"http://localhost/Demo/_vti_bin/ListData.svc/UserStories(12)",
    "etag":"W/\"10\"",
    "type":"Microsoft.SharePoint.DataService.UserStoriesItem"
},
"ContentTypeID":"0x010800B0CD2DCB798D704EA602F275139B7056",
"Title":"Story #12 UPDATED!",
"Priority":{"__deferred":{"uri":"http://nic-lee7/Demo/_vti_bin/ListData.svc/UserStories(12)/Priority"}},
"PriorityValue":"(2) Normal",
...
}
 ...
--changeset_973c-961a-5b1e--
--batch_e9ea-1b95-0f95--

ASP.Net AJAX Templating has kept track of all changes to all JSON objects, and on the call to saveChanges() it’s batched them all up and sent them across the wire as one big JSON post.  This means we can write applications that are less chatty and more performant with absolutely no extra effort.  That’s powerful!

Reverting Changes

The only thing that really remains to complete our user story application is to revert changes if someone clicks Cancel.  Unfortunately there is no elegant way to accomplish this.  The best we can do is re-retrieve all data from the server with a call to dataView.fetchData().  So our final onCloseDialog looks like this:

function onDialogClose(dialogResult, returnValue) {
	if (dialogResult == SP.UI.DialogResult.OK) {
		dataContext.saveChanges();
	}
	if (dialogResult == SP.UI.DialogResult.cancel) {
		dataView.fetchData();
	}
}

Conclusion

So far we’ve seen that templating is a more maintainable approach to displaying multiple list items on a page.   And we’ve seen that the master-details feature simplifies the job of cleaning up the UI.  In this post we’ve seen that the live bindings feature allows us to save data back to SharePoint in batches with a small amount of effort.  Implementing this functionality by hand would otherwise have required far, far more code.

Guest Author: Lee Richardson
http://rapidapplicationdevelopment.blogspot.com/

Lee Richardson is a Senior Software Engineer at Near Infinity Corporation, an enterprise software development and consulting services company based in Reston, Virginia. He is a Microsoft Certified Solution Developer (MCSD), a Project Management Professional (PMP), a Certified SCRUM master and has over ten years of experience consulting for the public and private sector. You can follow Lee on Twitter at @lprichar

]]>
http://www.endusersharepoint.com/EUSP2010/2010/07/12/client-side-ajax-applications-in-sharepoint-2010-%e2%80%93-part-7-live-bindings/feed/ 0
My Favorite SharePoint 2010 Search Features Include: http://www.endusersharepoint.com/EUSP2010/2010/07/05/my-favorite-sharepoint-2010-search-features-include/ http://www.endusersharepoint.com/EUSP2010/2010/07/05/my-favorite-sharepoint-2010-search-features-include/#comments Mon, 05 Jul 2010 14:00:38 +0000 Agnes Molnar http://www.endusersharepoint.com/EUSP2010/?p=964 This entry is part of a series, SharePoint 2010 Search Features»

Guest Author: Agnes Molnar
http://aghy.dotneteers.net

This is the first article of my series about SharePoint Search, including FAST Search for SharePoint 2010.

Although MOSS 2007 also has has very powerful Search capabilities, the SharePoint 2010 improvements are very impressive. In this article I’ll enumerate the most important capabilities of SharePoint 2010 Search, not including FAST Search. This one will be the topic of my next article in this series.

But first of all, let’s see the most important SharePoint 2010 Search improvements for end users:

1. Rich User Interface with Refinement Panel

Refinement Panel is the control that can be found as the left navigation bar on the Search results page. It helps us to refine the query and filter the results by various properties. In fact, the Refinement Panel is a Web Part, so it can be customized as well.

Moreover, Refinement Panel’s customization gives us the capability to set the properties included in the refinement, and customize them. This can be done by editing the ’Filter Category Definition’ of the Refinement Panel Web Part (see in a later article of mine).


2. Boolean Query Syntax

In the queries, it is possible to use Boolean expressions, with the operations AND, OR and NOT. With these, users can build complex query expressions according to their needs.


3. Suggestion while typing

As end users begin to type their query in, SharePoint will find queries executed in the past with results, and show them in the search box as pre-query suggestions. The more users query with SharePoint, the more suggestions can be proposed to them. 


4. ’Did you mean’ suggestions

As post-query suggestions, the end users get ’Did you mean’ suggestions in the search results. They are suggestions for similar words of the current query, based on the content in the index. It’s very useful to correct mistyping.


5. Federated results

In some cases, it’s better to use remote indexing server to return the results instead of SharePoint itself. For example, when the content source is huge and we cannot or don’t want to build a SharePoint index for it. Or when the content is a huge amount but the queries are very rare. Or when the content source requires other authentication than SharePoint itself.

In these cases, we can federate the results from a remote indexing server. That means, end users type the query on the same user interface in SharePoint, but the results will not only come from the index built by the local SharePoint but also from a remote search (for example, Bing). These results will be displayed in a separated Web Part on the result page:


6. ’View in Browser’ for Office documents

Since Office Web Applications can be installed on SharePoint 2010, the Office documents can be opened for reading and even for editing in the browser, without any Office client installation on the end user’s machine. Search result pages also offer a great functionality regarding Office Web Apps: the document results also contain a ’View in Browser’ link and can be opened directly in the browser immediately.


7. Improved People Search

People Search is also a very important feature of the SharePoint 2010 Search. It’s the feature for finding your colleagues by their name, responsibilities, interests or skills, and not only the functionality but even the User Interface for People Search has been improved in the new version of SharePoint.

For example, if you’re searching for a SharePoint expert in your company and enter the query term ’SharePoint’, you can see the people related to SharePoint as well as the content they have been working lately, their profile and place in the organization chart, etc. So that you can decide immediately who the best person is for your needs.

8. SharePoint Search engine as a Federated Location in Windows 7

Windows 7 Search functionality also can use federated locations, and this federated location can be SharePoint, for example. In this case, you can use SharePoint search from Windows Explorer, without opening a browser or your SharePoint site. The federated locations can be described in an .OSDX (Search Connector Descrition File) file that is a special XML file, so that you can create your own. It’s pretty easy but worthwhile of a separate post. Stay tuned, it’s coming soon…

Guest Author: Agnes Molnar
http://aghy.dotneteers.net

Agnes Molnar has been working with Microsoft technologies and SharePoint since 2001. After releasing MOSS 2007, she founded a SharePoint consulting company in Hungary, Central Europe. She’s been working as senior consultant and solutions architect, has leaded numerous Central European companies’ SharePoint implementation. Agnes’s main focus is on Architecture, Governance, Information and Knowledge Management, and Enterprise Search.

She’s also a frequent speaker of both Central European and international conferences, including Best Practices Conferences in Washington DC and London, SharePoint Conferences in Peru and many countries in Central Europe, SharePoint Saturdays, and more. She’s a co-author of the book ‘Real World SharePoint 2010′. You can follow Agnes on Twitter at @molnaragnes

Entries in this series:
  1. My Favorite SharePoint 2010 Search Features Include:
Powered by Hackadelic Sliding Notes 1.6.4
]]>
http://www.endusersharepoint.com/EUSP2010/2010/07/05/my-favorite-sharepoint-2010-search-features-include/feed/ 3
Consuming SharePoint Content Types in Office 2010 http://www.endusersharepoint.com/EUSP2010/2010/07/01/consuming-sharepoint-content-types-in-office-2010/ http://www.endusersharepoint.com/EUSP2010/2010/07/01/consuming-sharepoint-content-types-in-office-2010/#comments Thu, 01 Jul 2010 14:00:04 +0000 Michal Pisarek http://www.endusersharepoint.com/EUSP2010/?p=954 Guest Author: Michal Pisarek

One of the many requests from users was the ability to create SharePoint content from within the Office clients. Instead of a user needing to navigate to a library to create particular item based on a Content Type it would be great if this could be done directly through Word, Excel, One Note or Powerpoint.

Not only would this save time but the ability to control and define templates within SharePoint, while allowing users the option to create to these Content Types from the office clients that they are familiar with.

In SharePoint the improved integration between SharePoint 2010 and Office 2010 makes this possible. Essentially what this means is that a user can ‘subscribe’ to a document library and have those content types available within the office clients.

So how do we do this? Let’s assume that we have the following document library with the content types defined as below:


Now the user wants to be able to access these Content Types from Office 2010 clients. But how? Well it’s surprisingly easy! All you have to do is to click on the icon below:


This will add the Document Library to the Quick Links section. You can also click on the ‘Manage SharePoint Sites’ link to see what other site you have listed as well.


So now that you have performed this action you can now open one of the Office Clients, click on the ‘New’ button and see a new section called ‘SharePoint Templates’


The templates are available with full fidelity including any metadata attached to the Content Type, workflows and everything else. The other great integration piece is that if a user clicks on ‘Save’ SharePoint will save the content directly to the document library that the Content Types are subscribed to! That’s right there is no need to browse to the correct document library as it will open automatically.


Now this is a demonstration for Word 2010 but it works the same for all the Office suite of clients. Another example of the improved integration with SharePoint 2010 and Office 2010.

Guest Author: Michal Pisarek

Michal Pisarek is a solution specialist for Habañero Consulting Group, a Microsoft Gold Partner in beautiful Vancouver Canada. He has been working with SharePoint for 3 years and has a passion for finding the right balance between technology, innovation, governance and fun to meet his client’s needs.

You can find other articles by Michal on his blog SharePointAnalystHQ or follow him on Twitter (@michalpisarek)

]]>
http://www.endusersharepoint.com/EUSP2010/2010/07/01/consuming-sharepoint-content-types-in-office-2010/feed/ 1
Client Side AJAX Applications in SharePoint 2010 – Part 6: Master-Details http://www.endusersharepoint.com/EUSP2010/2010/06/29/client-side-ajax-applications-in-sharepoint-2010-%e2%80%93-part-6-master-details/ http://www.endusersharepoint.com/EUSP2010/2010/06/29/client-side-ajax-applications-in-sharepoint-2010-%e2%80%93-part-6-master-details/#comments Tue, 29 Jun 2010 14:01:34 +0000 Lee Richardson http://www.endusersharepoint.com/EUSP2010/?p=949 This entry is part of a series, Client Side AJAX Applications in SharePoint 2010»

Guest Author: Lee Richardson
http://rapidapplicationdevelopment.blogspot.com/

ASP.Net AJAX Templating is a compelling new client side technology from Microsoft that allows developers to more quickly build responsive and maintainable AJAX applications.  Because ASP.Net AJAX Templating and SharePoint 2010 both support the oData protocol they are a powerful combination.  This post in the series will focus on a particularly nice feature of ASP.Net AJAX Templating: master-details views.

Showing .selectedData

In order to show the currently selected item we will need some HTML that we can pop up that will bind to the currently selected list item.  Here’s the simplest possible example that will still work:

<div id="userStoryDetails" class="sys-template">{{ Title }}</div>

Notice the class of sys-template?  As mentioned in a previous post that class is required for any elements that a dataView attaches to.  It sets the element to display: none when the page is loaded, but the dataView sets it back to display: block when it renders.

Next, we’ll need a second dataView object that we’ll bind to the HTML above using the jQuery syntax:

detailsDataView = $("#userStoryDetails").dataView().get(0);

Note that we didn’t set the dataProvider or fetchOperation as we did for the main dataView.  The reason is that we will bind its data property to the main dataView’s selectedData property like this:

$create(Sys.Binding, {
	source: dataView,
	path: "selectedData",
	target: detailsDataView,
	targetProperty: "data"
});

selectedData is a special property on dataView that represents the currently selected item.  We’re pretty close to completing the master-details scenario.  The main item that remains is telling the master dataView when to update the selectedData.  We can accomplish this by simply adding sys:command="select" onto an element within the main dataView’s template.  Adding it to the button that opens the modal dialog is a logical location:

<a href="#" onclick="javascript:openDialog(); return false;" sys:command="select">
	<img src="/_layouts/images/edititem.gif" />
</a>

And now we’re in business:


Flushing out the Master’s Details

So far the details view is a bit sparse.  In the next article we will allow editing the fields of a particular user story and support saving it back to SharePoint.  For now, however, let’s add some additional read-only fields:

<div id="userStoryDetails" class="sys-template">
  <table class="ms-formtable" width="100%">
    <tr>
      <td class="ms-formlabel" width="190">Title:</td>
      <td class="ms-formbody">{{ Title }}</td>
    </tr>
    <tr>
      <td class="ms-formlabel" width="190">Points:</td>
      <td class="ms-formbody">{{ Points }}</td>
    </tr>
    <tr>
      <td colspan="2" nowrap>
        <span>Created at <span>
        <span>{{ String.format("{0:M/d/y h:m tt}", Created) }}</span>

        <input type="button" name="OK" value="OK" class="ms-ButtonHeightWidth"
          onclick="SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.OK); return false;" />
        <input type="button" name="Cancel" value="Cancel" class="ms-ButtonHeightWidth"
          onclick="SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.cancel); return false;" />
      </td>
    </tr>
  </table>
</div>

There are two things to note about the details view above.  The first is that we can display fields like Points that are not displayed by the main dataView (assuming they exist in the list).  This works because the master dataView downloaded all fields off of the main list by default.  How to retrieve data from related lists will the topic of a future article.

The second item to note is how easily we can deal with dates and times.  String.format is a method provided by the AJAX Library that can format the dates provided by SharePoint exactly like the C# / VB format specifiers readers are likely used to.  Here’s what the new details view looks like:


Here is the source for the entire application so far

<%@ Assembly Name="PreDemo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0a3e0ca56c5f97ba" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserStories.aspx.cs" Inherits="PreDemo.Layouts.PreDemo.UserStories" DynamicMasterPageFile="~masterurl/default.master" %>

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
	<STYLE type="text/css">
		.sys-template
		{
			display: none;
		}
		.userStoryBackground
		{
			background-image: url('Images/corkboard4.png');
			width: 100%;
			height: 600px;
			position: relative;
		}
		.userStoryCard
		{
			border: 1px solid #777777;
			width: 200px;
			cursor: move;
			background-image: url('Images/blankcard4.png');
			position: absolute;
		}
		.userStoryDescription
		{
			font-size: 13px;
			padding: 0px 5px 5px 5px;
		}
		.userStoryTitle
		{
			font-size: 15px;
			font-weight: bold;
			padding: 0px 0px 0px 0px;
			padding: 0px 5px 0px 5px;
		}
		.userStoryButtons
		{
			position: absolute;
			right: 0px;
			padding: 2px 2px 0 0;
		}
		.userStoryButtons img
		{
			border: 0 none;
		}
	</STYLE>

	<script
		src="../Scripts/jquery-ui-1.8.1.custom/js/jquery-1.4.2.min.js"
		type="text/javascript"></script>

	<script
		src="../Scripts/jquery-ui-1.8.1.custom/js/jquery-ui-1.8.1.custom.min.js"
		type="text/javascript"></script>

	<script
		src="../Scripts/MicrosoftAjax/jQueryStart.js"
		type="text/javascript"></script>

	<script
		src="../Scripts/MicrosoftAjax/MicrosoftAjax.js"
		type="text/javascript"></script>

	<script type="text/javascript">
		Sys.require([
			Sys.scripts.jQuery,
			Sys.components.dataView,
			Sys.components.openDataServiceProxy
			]);

		var dataView;
		var detailsDataView;
		var dataContext;
		var userStoryDetails;

		Sys.onReady(function () {
			userStoryDetails = document.getElementById('userStoryDetails');

			dataContext = Sys.create.openDataContext({
				serviceUri: "/Demo/_vti_bin/ListData.svc"
			});

			dataView = $("#userStories").dataView({
				dataProvider: dataContext,
				fetchOperation: "UserStories",
				fetchParameters: { orderby: 'Title' },
				autoFetch: "true",
				rendered: onRendered
			}).get(0);

			detailsDataView = $("#userStoryDetails").dataView().get(0);

			$create(Sys.Binding, {
				source: dataView,
				path: "selectedData",
				target: detailsDataView,
				targetProperty: "data"
			});
		});

		function onRendered() {
			$(".userStoryCard").draggable({
				stop: onDragStop
			});
		}

		function onDragStop(event, ui) {
			var userStoryCard = ui.helper[0];
			var selectedUserStoryJsonObject = dataView.findContext(userStoryCard).dataItem;

			var newX = ui.position.left;
			var newY = ui.position.top;

			Sys.Observer.setValue(selectedUserStoryJsonObject, "X", newX);
			Sys.Observer.setValue(selectedUserStoryJsonObject, "Y", newY);

			dataContext.saveChanges();
		}

		function openDialog() {
			var options = {
				html: userStoryDetails,
				width: 500,
				height: 200,
				title: "User Story",
				dialogReturnValueCallback: onDialogClose
			};
			SP.UI.ModalDialog.showModalDialog(options);
		}

		function onDialogClose(dialogResult, returnValue) {
			if (dialogResult == SP.UI.DialogResult.OK) {

			}
			if (dialogResult == SP.UI.DialogResult.cancel) {

			}
		}
	</script>
</asp:Content>

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
	<div id="userStoryDetails" class="sys-template">
		<table class="ms-formtable" width="100%">
			<tr>
				<td class="ms-formlabel" width="190">Title:</td>
				<td class="ms-formbody">{{ Title }}</td>
			</tr>
			<tr>
				<td class="ms-formlabel" width="190">Points:</td>
				<td class="ms-formbody">{{ Points }}</td>
			</tr>
			<tr>
				<td colspan="2">
					<span>Created at <span>
					<span>{{ String.format("{0:M/d/y h:m tt}", Created) }}</span>
					<span>
					<input type="button" name="OK" value="OK"
						onclick="SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.OK); return false;" accesskey="O" class="ms-ButtonHeightWidth" target="_self" />
					<input type="button" name="Cancel" value="Cancel"
						onclick="SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.cancel, 'Cancelled clicked'); return false;" accesskey="C" class="ms-ButtonHeightWidth" target="_self" />
					</span>
				</td>
			</tr>
		</table>
	</div>

	<div id="userStories"
		class="sys-template userStoryBackground"
		xmlns:sys="javascript:Sys">

		<div class="userStoryCard"
			sys:style="{{ 'left: ' + X + 'px; top: ' + Y + 'px;'}}">

			<div class="userStoryTitle">
				{{ Title }}
				<span class="userStoryButtons">
					<a href="#" onclick="javascript:openDialog(); return false;" sys:command="select">
						<img src="/_layouts/images/edititem.gif" />
					</a>
				</span>
			</div>
			<div class="userStoryDescription"><div>{{ Description }}</div>
		</div>
	</div>
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
Pre Demo
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >
Pre Demo
</asp:Content>

Summary

We’ve seen how to data bind a details dataView to the currently selected item of a master dataView and formatting options for different data types.  The next article in the series will update the detailsView to support editing list items.

Guest Author: Lee Richardson
http://rapidapplicationdevelopment.blogspot.com/

Lee Richardson is a Senior Software Engineer at Near Infinity Corporation, an enterprise software development and consulting services company based in Reston, Virginia. He is a Microsoft Certified Solution Developer (MCSD), a Project Management Professional (PMP), a Certified SCRUM master and has over ten years of experience consulting for the public and private sector. You can follow Lee on Twitter at @lprichar

]]>
http://www.endusersharepoint.com/EUSP2010/2010/06/29/client-side-ajax-applications-in-sharepoint-2010-%e2%80%93-part-6-master-details/feed/ 0
Create a Records Management Solution in SharePoint 2010 http://www.endusersharepoint.com/EUSP2010/2010/06/24/create-a-records-management-solution-in-sharepoint-2010/ http://www.endusersharepoint.com/EUSP2010/2010/06/24/create-a-records-management-solution-in-sharepoint-2010/#comments Thu, 24 Jun 2010 14:00:22 +0000 Michal Pisarek http://www.endusersharepoint.com/EUSP2010/?p=944 This entry is part of a series, Records Management Solutions»

Guest Author: Michal Pisarek

There has been a lot of talk within the SharePoint community in regards to the new Enterprise Content Management (ECM) features in SharePoint 2010.

Records Management had some weaknesses in MOSS 2007 which caused many customers reluctance in adopting the platform to truly manage content from creation through to disposition.

Fortunately in SharePoint 2010 there has been a significant investment in the Records Management aspects of the platform. Microsoft has listened to the user community and enhanced the functionality within the platform to support the creation of a full-fledged Records Management solution including:

  1. Support for multi-stage disposition rules
  2. Centralized management and syndication of Content Types
  3. Unique persistent document numbering across the entire lifecycle of content
  4. Complex routing rules to support hierarchical file plans
  5. Reporting across Sites and Site Collections for compliance details
  6. The ability to mix records and non-records within the same location

In this series of articles I am going to explain the process that we have gone through in creating a Records Management solution for clients using strictly out of the box configuration within SharePoint 2010. This series will provide an end to end overview of the kinds of decisions and considerations that we have made for our clients and will hopefully raise some questions from the user community about SharePoint and Records Management.

I also will be pretty honest in my findings! I am a true fan of SharePoint and love the new Records Management functionality but is it perfect? Of course not, however with some know how, configuration and planning you can build a robust, scalable solution that can really create value for your organization. I see SharePoint 2010 Records Management as a mid-market offering providing fantastic value while allowing an organization to manage their entire content life-cycle from a single, unified platform.

Our Goal

So before we start what are we trying to actually build? Well here is our very simplified version of our own endusersharepoint Records Management implementation:

  1. A Records Centre with a full hierarchical file plan with disposition rules defined at each node
  2. Centrally defined content types with retention policies and metadata attached
  3. The ability for users to manually declare items as records but also for items to be automatically declared as records if certain criteria are met
  4. A way to report on which content is in which stage of the disposition life-cycle.
  5. Unique document numbering that is persistent across the full life-cycle of the content
  6. The ability to declare any content as a Record, be it a document, list item or Document Set

Keep in mind that this is all out of the box configuration; there is absolutely no code at all! In some instances I have been a little creative and much more can be done if we layer custom code on top of our solution. But this is an example of how powerful configuration can be in SharePoint 2010.

Our Scenario

EUSP Catering Co. is a company that sells catering services. They contain a number of departments that use both collaboration sites to plan and coordinate events, in addition to less process driven sites such as document centers. When a new event is sold a collaboration site is created and all information is stored within the site. When items become records (such as contracts, menus, agreements and vendor receipts) they are either sent to a Records Center (in the case of financial information) or declared in place (in the case of discussions, tasks and other items).

The content goes through various retention rules dependent on the type of content. EUSP Catering Co. wants to reduce storage costs so a conscious effort is made to move content to cheaper storage after 3 years, and to destroy content after 7 years. In addition they wanted an easy way for employees to be able to declare contents as records, to be able to search for records and to ensure that no tampering of records has occurred.

Stay tuned as we begin the journey with EUSP Catering Co. to see if we can accomplish their goals and satisfy their business needs!

So where to from here? Well in the next article I will show the new features within SharePoint 2010 that will allow us to build our Records Management system including some tips on which features will provide instant benefit to any SharePoint implementation.

Guest Author: Michal Pisarek

Michal Pisarek is a solution specialist for Habañero Consulting Group, a Microsoft Gold Partner in beautiful Vancouver Canada. He has been working with SharePoint for 3 years and has a passion for finding the right balance between technology, innovation, governance and fun to meet his client’s needs.

You can find other articles by Michal on his blog SharePointAnalystHQ or follow him on Twitter (@michalpisarek)

Entries in this series:
  1. Create a Records Management Solution in SharePoint 2010
  2. SharePoint 2010 Records Management Overview
Powered by Hackadelic Sliding Notes 1.6.4
]]>
http://www.endusersharepoint.com/EUSP2010/2010/06/24/create-a-records-management-solution-in-sharepoint-2010/feed/ 9