MOSS 2007 CMS Project Technical Issues: Custom Field Type
2007-12-24 15:19
417 查看
Until now, I have been in the CMS team for almost six monthes. During this past period, I knew a lot about MOSS 2007 with SP1, that's a not good experience because of both the technique lack and some weird places in it. Below I list the issues I met in our project, and hope it could be userful for your future project.
1) Custom field type. In MOSS 2007, there is the possibility you can create your own field type using "custom field type". Here, I met two points should be mentioned: First is you shold add some code to handle the custom property, because the property will lost with only once-save-action. Sample:
Normally, you should set/get the custom property like below way:
{
this.SetCustomProperty("SourceWeb", this.SourceWeb);
base.Update(); if (updatedSourceWeb.ContainsKey(ContextId))
{
updatedSourceWeb.Remove(ContextId);
} }
private string sourceWeb;
public string SourceWeb
{
get
{
return updatedSourceWeb.ContainsKey(ContextId) ? updatedSourceWeb[ContextId] : sourceWeb;
}
set
{
this.sourceWeb = value;
}
} public int ContextId
{
get
{
return SPContext.Current.GetHashCode();
}
} public void UpdateSourceWeb(string value)
{
updatedSourceWeb[ContextId] = value;
} 2) There is a known issue about the custom field type. After the custom field is deployed on the server, you can find the properties in the editor page correctly, but when you new a document, in the pop-up property dialog window, you can not find the corresponding fields. About this bug of Microsoft , you can solve it using sp1 of MOSS 2007. Now the sp1 has been available. 3) About the deployment of custom fields, some pages/controls/xmls are necessary, you can find the related documents from googling sites. Because it's difficult to know what happens when it goes live, the detailed log service are strongly recommanded here, certainly you alos can refer to the huge logs from MOSS 2007 (.../1033/logs/...).
1) Custom field type. In MOSS 2007, there is the possibility you can create your own field type using "custom field type". Here, I met two points should be mentioned: First is you shold add some code to handle the custom property, because the property will lost with only once-save-action. Sample:
Normally, you should set/get the custom property like below way:
public override void Update()
{
this.SetCustomProperty("SourceWeb", this.SourceWeb);
base.Update(); }
Unfortunately, you should do it like below way: public override void Update(){
this.SetCustomProperty("SourceWeb", this.SourceWeb);
base.Update(); }
{
this.SetCustomProperty("SourceWeb", this.SourceWeb);
base.Update(); if (updatedSourceWeb.ContainsKey(ContextId))
{
updatedSourceWeb.Remove(ContextId);
} }
private string sourceWeb;
public string SourceWeb
{
get
{
return updatedSourceWeb.ContainsKey(ContextId) ? updatedSourceWeb[ContextId] : sourceWeb;
}
set
{
this.sourceWeb = value;
}
} public int ContextId
{
get
{
return SPContext.Current.GetHashCode();
}
} public void UpdateSourceWeb(string value)
{
updatedSourceWeb[ContextId] = value;
} 2) There is a known issue about the custom field type. After the custom field is deployed on the server, you can find the properties in the editor page correctly, but when you new a document, in the pop-up property dialog window, you can not find the corresponding fields. About this bug of Microsoft , you can solve it using sp1 of MOSS 2007. Now the sp1 has been available. 3) About the deployment of custom fields, some pages/controls/xmls are necessary, you can find the related documents from googling sites. Because it's difficult to know what happens when it goes live, the detailed log service are strongly recommanded here, certainly you alos can refer to the huge logs from MOSS 2007 (.../1033/logs/...).
相关文章推荐
- MOSS 2007 CMS Project Technical Issues: Permission / Workflow deployment
- Microsoft Office Project 2007 使用指南(3) - Create a custom field
- MOSS / Sharepoint 2007 Custom Error Page and Access denied Page
- wss custom field type
- How to Add Custom Field Type (in SPFieldType Enum) Programatically or any other way
- Creating a custom Site Definition in MOSS 2007
- How to add custom field to Moss search results?
- 一个简单的Checkbox Custom Field Type
- 解决Custom Field Type修改时属性显示不正确的问题
- 一个简单的Checkbox Custom Field Type
- Sharepoint Custom Control Creating custom Multi Choice field type
- MOSS & Project Server 2007
- 一个简单的Checkbox Custom Field Type
- About sharepoint custom FieldType bug
- Developing custom field type for SharePoint 201
- custom style(css) to RichHtmlField Control(MOSS)
- SharePoint基于SPFieldMultiColumn的Custom Field Type切记要覆盖GetFieldValue方法
- SharePoint Custom Field Type与RenderTemplate ID与ascx页面无关联
- How to create your own custom 404 error page and handle redirect in SharePoint 2007 (MOSS)?
- 转:How to create your own custom 404 error page and handle redirect in SharePoint 2007 (MOSS)?