|
Home > Archive > Microsoft Content Management Server > December 2004 > Property Authoring Server Control Problem
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Property Authoring Server Control Problem
|
|
| DaveyB 2004-12-09, 7:47 am |
| Am I right in thinking that when you edit page properties the published
version of the page is pulled from the 'live' site until it has been
approved? This seems to be the case, and I seem to remember seeing something
documented as to why this happens.
The problem I'm having is that when I use Stefans property authoring server
control on a page I think it always saves the properties even if they haven't
been changed, forcing the workflow engine to ditch the published version of
the page.
a) have I got this right?!
b) if I have is there any way around it other than duplicating the set value
of the property and checking if it's changed before forcing a save (or
forcing it not to save!)
Any help greatfully recieved!
David
| |
| Stefan [MSFT] 2004-12-09, 7:47 am |
| Hi Davey,
yes, that is correct.
This always happens if you modify a property.
a) yes this is right
b) a workaround would be to add some logic to my control to compare the
current value to the new one and only store the value if it is different.
E.g. for the Calendar control you need to add the check ahead of this line:
I would suggest to do the modification in the "set" accessor.
E.g. for the CalendarValue you need to modify the routine like this:
public DateTime CalendarValue
{
get
{
....
}
set
{
if (_name == EnumPropertySet.ExpiryDate)
if (_p.ExpiryDate != value.ToUniversalTime())
_p.ExpiryDate = value.ToUniversalTime();
if (_name == EnumPropertySet.StartDate)
if (_p.StartDate = value.ToUniversalTime())
_p.StartDate = value.ToUniversalTime();
if (_name == EnumPropertySet.CustomProperty)
if (_p.CustomProperties[_custPropName].Value = value.ToString())
_p.CustomProperties[_custPropName].Value = value.ToString();
}
}
You will have to do this for all different property types.
Cheers,
Stefan.
"DaveyB" <DaveyB@discussions.microsoft.com> wrote in message
news:AC5C29C8-BC65-45D2-89EE-2010FBB4288F@microsoft.com...
> Am I right in thinking that when you edit page properties the published
> version of the page is pulled from the 'live' site until it has been
> approved? This seems to be the case, and I seem to remember seeing
something
> documented as to why this happens.
>
> The problem I'm having is that when I use Stefans property authoring
server
> control on a page I think it always saves the properties even if they
haven't
> been changed, forcing the workflow engine to ditch the published version
of
> the page.
>
> a) have I got this right?!
> b) if I have is there any way around it other than duplicating the set
value
> of the property and checking if it's changed before forcing a save (or
> forcing it not to save!)
>
> Any help greatfully recieved!
>
> David
| |
| DaveyB 2004-12-09, 5:49 pm |
| Thanks Stefan, this works really well, with minimal changes!
D
"Stefan [MSFT]" wrote:
> Hi Davey,
>
> yes, that is correct.
> This always happens if you modify a property.
> a) yes this is right
> b) a workaround would be to add some logic to my control to compare the
> current value to the new one and only store the value if it is different.
>
> E.g. for the Calendar control you need to add the check ahead of this line:
>
> I would suggest to do the modification in the "set" accessor.
> E.g. for the CalendarValue you need to modify the routine like this:
>
> public DateTime CalendarValue
> {
> get
> {
> ....
> }
> set
> {
> if (_name == EnumPropertySet.ExpiryDate)
> if (_p.ExpiryDate != value.ToUniversalTime())
> _p.ExpiryDate = value.ToUniversalTime();
> if (_name == EnumPropertySet.StartDate)
> if (_p.StartDate = value.ToUniversalTime())
> _p.StartDate = value.ToUniversalTime();
> if (_name == EnumPropertySet.CustomProperty)
> if (_p.CustomProperties[_custPropName].Value = value.ToString())
> _p.CustomProperties[_custPropName].Value = value.ToString();
> }
> }
>
> You will have to do this for all different property types.
>
> Cheers,
> Stefan.
>
>
> "DaveyB" <DaveyB@discussions.microsoft.com> wrote in message
> news:AC5C29C8-BC65-45D2-89EE-2010FBB4288F@microsoft.com...
> something
> server
> haven't
> of
> value
>
>
>
|
|
|
|
|