Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Saving Web Part Attributes.

  Asked By: Katie    Date: Dec 02    Category: Sharepoint    Views: 1112

I have a few architectural questions though.

1) If I user "Personal Storage" - the saved Web Part Attribute follows the
user to any PC and can be different for different users of the same PC?

2) If someone changes the Web Part Attribute, does that unghost the page in
any way??

I guess the basic question is, where does the Web Part Attribute get stored,
in the SQL Database by user name?

I want to avoid (as much as possible) changes to server files that could be
"administered" by the "adminsitrators" - they have a way of dumping stuff
they don't understand.

Share: 

 

6 Answers Found

 
Answer #1    Answered By: Damon Garner     Answered On: Dec 02

1) Yes it follows the person, and if they go to another PC it will be different for each user  that logs on the PC.

2) No it doesn't unghost the page.

I believe it is getting stored  in the content database, as a wild guess it would be in ther personalization table. Ok just did a quick and dirty test on a pretty much empty site. I made a change to a web  part on a personal  page and sure enough, before I made the change the personalization table was empty, after it had a new row in it.

 
Answer #2    Answered By: Christop Mcfadden     Answered On: Dec 02

1) Personal Storage is in the back end database. It is user  specific not machine specific.

2) Changing Web Part attributes  does not unghost pages.

3) The Web Part attributes are stored  in the database  – they’re not actually stored by user they’re all stored together (but that’s an implementation detail you shouldn’t depend on.)

 
Answer #3    Answered By: Stefanie Ruiz     Answered On: Dec 02

OK, while the attributes  may be stored  together, are they expressed on a
user by user  basis? My guess would be yes (if PersonalStorage).

 
Answer #4    Answered By: Damon Garner     Answered On: Dec 02

Yes.......................................

 
Answer #5    Answered By: Royce Orr     Answered On: Dec 02

I presume but I’ve not dug into it much. I stumbled across this while looking at another problem.

 
Answer #6    Answered By: Laura Walker     Answered On: Dec 02

Although I have not validated this, I live under the strong suspicion
that Web Part properties that have a different current value than the
default value are serialized into the database  as a single XML node. If
the default value is the same as the value in the properties decorative
attribute I doubt that value is stored  (except for DateTime and
KnownColor, of course which cannot have a default value attribute).

The root element of the node is probably the XmlRoot Namespace value
provided as a decorative attribute  to the Web Part class. Each element
in the node is probably the value given in the XmlElement attribute for
each property or if the attribute is not provided (it typically is not)
then it probably uses the name of the property (or less likely, the
FriendlyName attribute). I suspect that this data is stored in the
tp_PerUserProperties column of the WebParts table for Shared values. The
same column of the Personalization table is probably used for My values;
one XML Node for each unique Web Part + user  SID. Unfortunately, the
tp_PerUserProperties value is stored as a <binary> value and I just
haven't had time to try and crack it open (what is the syntax to do that
anyway?).

So, perhaps the node for a Web Part with a string custom property called
Text set to the non-default value "Todd" may look something like the
following XML node:

<myNamespace>
<Text>Todd</Text>
</myNamespace>

If the framework finds a row in the Personalization table for this Web
Part for this user, it uses those values. Either way, I would guess that
it checks for Shared values in the Web Part table. The Shared values are
then used wherever personal  values were not found. All other values are
assumed to be the default value defined in the custom property default
value attribute.

Again this is just my speculation (read: "wild guess"). Whether this is
technically true or not has not yet been important enough in the work
I've done with Web Parts to date to require that I validate the hunch.
If someone else knows for sure, please correct my suppositions as
required.

 
Didn't find what you were looking for? Find more on Saving Web Part Attributes. Or get search suggestion and latest updates.




Tagged: