Wednesday, November 21, 2007

Cannot find an specifier object of presentation integrated

You might have the error blow during installing Step 3 Prep Forest of Office Communication Server 2007.

"Error [0xC3EC78CA]. Cannot find an specifier object of presentation integrated"

[Korean]
"[0xC3EC78CA] 하나 이상의 기본 제공 표시 지정자 개체를 찾을 수 없습니다. 로그 파일(%Windir%\Debug\Dcpromohelp.log 및 %Windir%\Debug\Csv.log)을 검토하여 DcPromo 프로세스 동안 모든 표시 지정자 개체가 제대로 만들어졌는지 확인하십시오."

The main reason would be that your machine is non-English version Windows and you can use cvsde command to import missing object specifiers.

[Example Usage]
C:\> csvde -i -f %windir%\system32\mui\dispspec\dcpromo.csv -c DOMAINPLACEHOLDER "DC=calgarytips, DC=com" -j %windir%\debug -k

Click
this URL for detail.


Reference URL
  1. Display Specifiers
  2. Language Identifier Constants and Strings
    - 0x0409 United States (US)
    - 0x0412 Korean (ko)

Wednesday, November 7, 2007

Things WSS 3.0 Custom Field Types Can Do

  1. How the field is displayed/rendered in the SharePoint interface
  2. How the data is formatted when it gets stored in the field
  3. Validation
  4. Etc
This is a note from somewhere on the internet.

Tuesday, November 6, 2007

Using Custom SPFieldMultiColumn Class 2

After that Using Custom SPFieldMultiColumn Class 1 including steps to follow
In this scenario, I'll make a Class Library and to save a phone number like this ##) ####-#### and to show as well in New/Edit Mode.

1. [Field Class]


2. [Field Control Class]
- Member Variables and Value Property


- Create Child Controls

- [in CreateChildControl] Make a table and put controls into it


3. [Field Definition]



4. Test (Create a new column, a new item and see an item)

To Create Custom Field Type

To Create Custom Field Type:

  1. extend a default Windows SharePoint Services field type by defining a custom field type and control for displaying the field
  2. adding a field type definition to register the field type and its control.

To Deploy Custom Field Type:
(You don't need to copy these files, if you installed VS extensions for SharePoint. Simply click the field control of SharePoint Templates)

  1. create a Class Library project that defines custom classes for the field type and the control and build it.
  2. copy the DLL to the global assembly cache (GAC)
  3. (Optional - only if you make a user control) copy the ascx file to Local_Drive:\\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES.
  4. add an XML file containing a field definition that references the DLL to Local_Drive:\\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML.
  5. add SafeControl element for that assembly into the web.config of your virtual Directories.
  6. Reset IIS.

Before coding, download Visual Studio 2005 extensions for Windows SharePoint Services version
- Tools for developing custom SharePoint applications: Visual Studio project templates for Web Parts, site definitions, and list definitions; and a stand-alone utility program, the SharePoint Solution Generator. This CTP is not recommended for use in production systems. This tool contains the tool for Custom Field so you can build and deploy with that tool easily.



[A custom field that derives from the SPFieldText class]


[A custom field control that derives from TextField class]

[Definition file - fldtypes_*guid]



------ [Korean] ------
사용자 정의 필드 타입을 생성하려면:
  1. 기본 WSS 필트 타입을 확장하여 사용자 정의 필드 타입과 필드의 표시방법을 위한 컨트롤을 정의한다.
  2. 필드 타입과 그것의 컨트롤을 등록하기 위한 필드 타입 정의를 추가한다.

사용자 정의 필드 타입을 배포하려면:
(SharePoint Extension 을 설치면, 아래와 같은 작업을 할 필요가 없이 VS 가 배포를 해줍니다.)
  1. Field 와 FieldControl 클래스를 정의하는 Class Library Project 를 생성하고 빌드합니다.
  2. DLL 을 global assembly cache(GAC) 에 설치합니다.
  3. (옵션 - 사용자 정의 컨트롤을 만들었다면) ascx 파일을 Local_Drive:\\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES. 에 복사합니다.
  4. Field Definition XML 파일을 Local_Drive:\\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML 에 복사합니다.
  5. Virtual Directories 의 해당 사이트의 Web.config 파일에 SafeControl element 를 추가합니다.
  6. IIS 를 reset 합니다.

앞에서 말했듯이, Visual Studio 2005 extensions for Windows SharePoint Services 를 설치하고 나면 위의 과정을 VS 가 자동적으로 처리해주어 훨씬 수월하게 작업을 할 수가 있습니다.

VS Extentions for WSS :사용자 정의 SharePoint 어플리케이션을 개발할 수 있도록 해주는 도구: 웹 파트, 사이트 정의, 리스트 정의, 혹은 독립 유틸리티 프로그램, SharePoint 솔루션 제너레이터 등

코드는 위 캡쳐된 사진들을 참조하세요.

Using Custom SPFieldMultiColumn Class 1

SPFieldMultiColumn is a field type that is hidden in the user interface, but is accessible only through the Windows SharePoint Services 3.0 object model.

There's two class files normally but you can add a ascs file for Template or somthing else and these are simple instructions to make a custom MultiColumn Field.

  1. Extend SPFieldMultiColumn for field and BaseFieldControl for field control.
  2. Override GetFieldValue method to return SPFieldMultiColumnValue object after converting(Create a instance of it using the string argument) to SPFieldMultiColumnValue type (Field).
  3. Override Value property to save value and to assign.
  4. Override CreateChildControls method to show controls you want to do it with.

Click Using Custom SPFieldMultiColumn Class 2 to next step.


------ [Korean] ------
SPFieldMultiColumn 은 사용자 인터페이스에서 감춰진 필드 타입으로
Windows SharePoint Services 3.0 object model 에서 만 접근이 가능합니다.
기본적으로 2개의 클래스가 있고 사용자 정의 컨트롤이나 다른 기능을 추가할 수도 있습니다.

아래는 아주 간단한 구현 방법을 나타합니다.

  1. SPFieldMultiColumn(Field) 을 그리고 BaseFieldControl(FieldControl) 을 상속합니다.
  2. GetFieldValue 를 오버라이드 합니다. string 을 인자로 받아 SPFieldMultiColumnValue 타입으로 클래스를 생성하고 리턴합니다.
  3. Value property 를 오버라이드 합니다. 값을 저장하고 할당하기 위해 사용됩니다.
  4. CreateChildControls 를 원하는 컨트롤을 혹은 기능을 추가하기 위해 오버라이드 합니다.

다음 심화 단계를 보시려면, 여기를 클릭하세요.

Disposable Windows SharePoint Services Objects and Coding Techniques

Frequently, developers call the object model to manipulate data but they don't dipose the object after use it and this may cause unusal behaviors.

  • Frequent recycles of the Microsoft Windows SharePoint Services application pool, especially during peak usage
  • Application crashes that appear as heap corruption in the debugger
  • High memory use for Microsoft Internet Information Services (IIS) worker processes
  • Poor system and application performance

Coding Techniques
You can take advantage of certain coding techniques to ensure that objects are disposed of. These techniques include using the following in your code:

  • using clause
  • try, catch, and finally blocks
  • to retuce Long-Term Object Retention

    [Code Example]


If you want to see more, refer to the SDK.
Remember SDK is your friend near by you always.


------ [Korean] ------
Disposable 가능한 Windows SharePoint Services Objects 과 코딩 기술

SharePoint 개발에 대한 번역서가 없어서인지 국내 SharePoint 개발자들!!! 애로사항이 많습니다. 그리고 돌아다니는 코드 중에 SPSite 와 SPWeb 을 죽여주는 로직이 없는데, 그게 안 좋은 것이라고 MS 가 그러네요... 간단히 List 만 접근하려고 해도 생성하는 것들인데, 특히 웹 파트 등에서 생성하면 꼭 죽여야하고 안 죽이면 불이익?을 당한다는 소리도 있습니다. 저도 왠지 경험한 듯한 기억이 있습니다. 제가 아닌 누군가에 의해... ㅠㅠ 교육을 시켜야할 듯...여튼, 자세한 내용은 당근 SDK 에 있습니다.

  • 잦은 회수, 특히 바쁠때...
  • Debugger 에서의 힙 악영향?, 어플리케이션 충돌 (이거!!!)
  • IIS Process 의 많은 메모리 사용
  • 시스템이 불안하고 성능이 떨어짐

코드 기술은 위를 참조하세요~

SharePointListItemViewer

ListItem is...
Represents an item or row in a list.

[Copy from SDK]
Use the Items property or one of the GetItems methods of the SPList class, or use the Items property or GetItemsInFolder method of the SPDocumentLibrary class to return an SPListItemCollection object that represents the collection of items in a list. Use an indexer to return a single item from the collection. For example, if the collection is assigned to a variable named myItems, use myItems[index] in C#, or myItems(index) in Visual Basic 2005, where index is either the index number of the item in the collection,the internal name, or the display name of a list field. For an indexer based on a name, Windows SharePoint Services first looks for the field by internal name and then by display name.
To assign values to a field in a list item using an indexer, the values must be represented in a format that is appropriate for each built-in field type.

For ListItem Programming...
you need to know internalName of ListItem
That's why I started to make this program.
As you can see, there's an order for fields looks for and I prefer to use internal name because since I got an error for using display name and I read an article for that must use internal name than display name but I don't know what exactly. Anyways, Korean version of SharePoint is totally different between both.


SPListItemViewer is...
simply, print out all SPFields to get Title, InternalName and Item Value and CAML Query can be typed for specific SPListItem.



To download this, Click
here!!!

To test this program, you must run it locally
and read below requirements.

※ Requirements for this Program
1. Windows 2003 Server R2 or with ServicePace 2 installed
2. Runs SharePoint Server locally



------ [Korean] ------
SPListItemViewer 는...
SPListItem 의 Fields 들을 볼 수 있는 프로그램입니다.
ListItem 프로그래밍할때, ListItem 의 값이나 InternalName 을 알고자 할때혹은 CAML Query 등을 테스트하고자 할때 사용합니다. 위 SDK 에서 Field 를 찾을때는, 첫째로 internal name 그리고 display name 을 찾는다고 합니다. 그런데 관련 주제로 검색을 하다보면, internal name 이 대세이더군요... 한글은 직빵 에러이고, 영문은 가끔? 났었던 것 같네요... ^^
영문판이라면 둘의 값이 비슷한데, 한글은 보다시피 알수가 없죠...(어떤 인코딩일지???) ㅠㅠ 어쨌든, 영문판이라 해도 서로간의 혼동을 피하기 위해 internal name으로 코딩하는게 좋을 것 같네요... (뭐 순서만 잘 안다면, indexer 에 숫자를 넣어도 됩니다. --;)
다운로드하려면, 여기를 눌러주세요!!!
코드는 나중에 시간나면, 설명해드릴께요~ (쉬워요~~.)

The best one when you need help

The first, Look for WSS 3.0 SDK thoroughly!!!
(To download, click
here)

If you can't catch any idea from,
then Go to :

1.
MSDN for new one or features.
2.
Google for some advice and code tested or implemented

There are good resources for SharePoint Programming,
MSDN Blog and SharePoint Team Blogs and SharePoint MVP's blog.
Microsoft webcasts and clips on the internet will help you as well
when it's hard to get it or to see what it is... if you find them luckly...
(I got form authentication info from SP team blog)

Currently, I don't have URLs of those but I'll post later soon.


------ [Korean] ------
첫째로, SDK 를 보세요!!!
(다운로드하려면,
여기를 눌러주세요)

SDK 만으로도, 만족을 못한다면...
(보통은 만족하기 어렵습니다.)

1.
MSDN : 새로운 것이 있나...
2.
Google : 관련 내용이나 구현 예제 등을 보기 위해...
위 사이트를 방문하세요!

참고로
MSDN Blog, SharePoint Team Blog, MVP 들의 블로그가 있으니,
한번 둘러보고 관련 내용을 찾아보고 질문 등을 해보세요~
저도 이곳을 통해 폼 인증에 대한 정보를 얻었습니다.

위 사이트의 링크는 현재 이 글을 집에서 작성하는 관계로
다음에~~ 올리도록 하겠습니다.