Release owner when creating new posting
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > Release owner when creating new posting




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Release owner when creating new posting  
Guy Babbitt


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-04 11:08 PM

I am having a hard time releasing the owner of a posting when I am creating
the initial page.  I can release the owner on reedit, but I would also like
to have the option to release the owner when the page is first created.

I have created a class to handle this action and inherited from
AuthoringSaveNewAction.  I can succesfully include the option on my console
and I see it when I am creating a new page.  The problem I am having is that
the

protected override void PerformActionBehavior()

is never firing.  The one big difference between a new page and a reedit is
that you get the webform asking for a name.  I am wondering if that is not
causing me to be directed back to the base class causing me to miss the
event.

Any thoughts on how I can either fix this or debug the problem more
effectively?

Guy







[ Post a follow-up to this message ]



    Re: Release owner when creating new posting  
Stefan [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-04 11:08 PM

Hi Guy,

check my solution on this:
http://www.gotdotnet.com/Community/...D4-6D469BE34BC0
This solution contains all necessary console actions.

Cheers,
Stefan.

--
This posting is provided "AS IS" with no warranties, and confers no rights.

MCMS FAQ:
http://download.microsoft.com/downl...>
MCMS+2002+-+(complete)+FAQ.htm
MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
MCMS Sample Code:
http://www.gotdotnet.com/community/...nagement+Server
MCMS Whitepapers and other docs:
http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
--------------------------------


"Guy Babbitt" <guy_babbitt@fsafood.com> wrote in message
news:#VcBHdGjEHA.556@tk2msftngp13.phx.gbl...
> I am having a hard time releasing the owner of a posting when I am
creating
> the initial page.  I can release the owner on reedit, but I would also
like
> to have the option to release the owner when the page is first created.
>
> I have created a class to handle this action and inherited from
> AuthoringSaveNewAction.  I can succesfully include the option on my
console
> and I see it when I am creating a new page.  The problem I am having is
that
> the
>
> protected override void PerformActionBehavior()
>
> is never firing.  The one big difference between a new page and a reedit
is
> that you get the webform asking for a name.  I am wondering if that is not
> causing me to be directed back to the base class causing me to miss the
> event.
>
> Any thoughts on how I can either fix this or debug the problem more
> effectively?
>
> Guy
>
>







[ Post a follow-up to this message ]



    Re: Release owner when creating new posting  
Guy Babbitt


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-04 11:08 PM

That is exactly what I am doing, but since mine doesn't work I decided to
give yours a shot.  Same behavior.  If I put a breakpoint on the base.Text I
will see a break every time the page loads, so I know the class is being
accessed.  I also know this because I see the option in my admin console.
When I click the link I am taken to the page where I specify the posting
name.  The problem is my breakpoint at base.PerformActionBehavior() is never
hit.  Any idea what might cause this.  As I mentioned, it only happens
happens here and I don't know if it is because of the actionjavascript in
the base class that throws the "save as" dialog or what else it might be.

public class SaveNewandReleaseOwnership : AuthoringSaveNewAction

{

internal const string ID_FIELD_NEWPAGE_NAME = "WBC_fieldNewPageName";

internal const string ID_FIELD_NEWPAGE_DISPLAYNAME =
"WBC_fieldNewPageDisplayName";

public SaveNewandReleaseOwnership()

{

base.Text = "Save with Release Ownership";

}

protected override void PerformActionBehavior()

{

base.PerformActionBehavior();

PostingCollection pc =
CmsHttpContext.Current.Searches.UserPostingsInProduction();

foreach (Posting p in pc)

{

if (p.Parent.Path == CmsHttpContext.Current.Channel.Path)

{

if (p.Name == Page.Request.Form[ID_FIELD_NEWPAGE_NAME])

{

p.ReleaseOwnership();

CmsHttpContext.Current.CommitAll();

}

}

}

}

}

"Stefan [MSFT]" <stefang@online.microsoft.com> wrote in message
news:eH%237deHjEHA.2456@TK2MSFTNGP10.phx.gbl...
> Hi Guy,
>
> check my solution on this:
> http://www.gotdotnet.com/Community/...D4-6D469BE34BC0
> This solution contains all necessary console actions.
>
> Cheers,
> Stefan.
>
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> MCMS FAQ:
> http://download.microsoft.com/downl...
a/MCMS+2002+-+(complete)+FAQ.htm
> MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
> MCMS Sample Code:
> http://www.gotdotnet.com/community/...nagement+Server
> MCMS Whitepapers and other docs:
> http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
> --------------------------------
>
>
> "Guy Babbitt" <guy_babbitt@fsafood.com> wrote in message
> news:#VcBHdGjEHA.556@tk2msftngp13.phx.gbl... 
> creating 
> like 
> console 
> that 
> is 
>
>







[ Post a follow-up to this message ]



    Re: Release owner when creating new posting  
Stefan [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-27-04 11:08 PM

Hi Guy,

some customers have exensivly tested these console actions and run them in
their production environment - so these controls work fine.
Do you have a custom workflow implemented (custom events)?
If yes, please disable them and test again.

Cheers,
Stefan.

--
This posting is provided "AS IS" with no warranties, and confers no rights.

MCMS FAQ:
http://download.microsoft.com/downl...>
MCMS+2002+-+(complete)+FAQ.htm
MCMS Blog: http://blogs.msdn.com/stefan_gossner/category/4983.aspx
MCMS Sample Code:
http://www.gotdotnet.com/community/...nagement+Server
MCMS Whitepapers and other docs:
http://blogs.msdn.com/stefan_gossne...2/07/41859.aspx
--------------------------------


"Guy Babbitt" <guy_babbitt@fsafood.com> wrote in message
news:OXyncoHjEHA.3664@TK2MSFTNGP12.phx.gbl...
> That is exactly what I am doing, but since mine doesn't work I decided to
> give yours a shot.  Same behavior.  If I put a breakpoint on the base.Text
I
> will see a break every time the page loads, so I know the class is being
> accessed.  I also know this because I see the option in my admin console.
> When I click the link I am taken to the page where I specify the posting
> name.  The problem is my breakpoint at base.PerformActionBehavior() is
never
> hit.  Any idea what might cause this.  As I mentioned, it only happens
> happens here and I don't know if it is because of the actionjavascript in
> the base class that throws the "save as" dialog or what else it might be.
>
> public class SaveNewandReleaseOwnership : AuthoringSaveNewAction
>
> {
>
> internal const string ID_FIELD_NEWPAGE_NAME = "WBC_fieldNewPageName";
>
> internal const string ID_FIELD_NEWPAGE_DISPLAYNAME =
> "WBC_fieldNewPageDisplayName";
>
> public SaveNewandReleaseOwnership()
>
> {
>
> base.Text = "Save with Release Ownership";
>
> }
>
> protected override void PerformActionBehavior()
>
> {
>
> base.PerformActionBehavior();
>
> PostingCollection pc =
> CmsHttpContext.Current.Searches.UserPostingsInProduction();
>
> foreach (Posting p in pc)
>
> {
>
> if (p.Parent.Path == CmsHttpContext.Current.Channel.Path)
>
> {
>
> if (p.Name == Page.Request.Form[ID_FIELD_NEWPAGE_NAME])
>
> {
>
> p.ReleaseOwnership();
>
> CmsHttpContext.Current.CommitAll();
>
> }
>
> }
>
> }
>
> }
>
> }
>
> "Stefan [MSFT]" <stefang@online.microsoft.com> wrote in message
> news:eH%237deHjEHA.2456@TK2MSFTNGP10.phx.gbl... 
http://www.gotdotnet.com/Community/...r />
69BE34BC0[vbcol=seagreen] 
http://download.microsoft.com/downl...
+Server[vbcol=seagreen] 
reedit[vbcol=seagreen] 
>
>







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:35 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register