MOSS 2007 CMS Project Technical Issues: Custom Field Type

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:

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();

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/...).

转载于:https://www.cnblogs.com/hanfey/archive/2007/12/24/1012750.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值