Saturday, July 31, 2010

Can not save properties WP in publishing site...

There's the interesting thing when you are a developer based on SharePoint that why do not save the properties of Web Part if it is publishing site template.

Of course, when you save the properties at the runtime, you must set SaveProperties = true to apply the any changes.

But in publishing site, before doing any changes on WP, you must do check out and after finish changing to do check in. At the same time, only one user can be checked-out/checked-in to avoid the conflict.

.....

Một điều thú vị mà ai khi lập trình SharePoint cũng sẻ hỏi là, tại sao không lưu được các thuộc tính của webpart khi sử dụng template Publishing Site.

Dĩ nhiên, khi thực hiện thao tác lưu thuộc tính của webpart cho dù runtime hay không thì việc s73 dụng thuộc tính SaveProperties = true cũng chẳng ảnh hưởng nhiều, mục đích chỉ để Apply những thì đã thay đổi.

Trong publishing site, muôn lưu lại các thuộc tính của WP thì truoc tiên phải Check Out site đó ra, rồi thao tác trên WP, sau khi thao tác xong, nhớ check in lên; Tại 1 thời điểm chỉ có 1 user có thể check out và check in để tránh conflict.

No comments: