CopyAction, MoveAction Modification
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
CopyAction, MoveAction Modification

 
Post new topic   Reply to topic    Windows Server Forum Index -> CMS Server
Author Message
MurrayTh
Guest





Posted: Fri Oct 21, 2005 12:50 am    Post subject: CopyAction, MoveAction Modification Reply with quote

I have implemented an application-level PropertyChanging event handler to
evaluate the Name and Display Name values when a page is created or when
properties are modified. Besides checking naming rules, is checks to see
that the Name and Display Name values are unique in the channel. It works
fine.

However, if authors use Copy, Move, or Create a Connected Page, the event
handler does not run, as the properties are not changed. Therefore an author
could still place a page with a duplicate Name or Display Name value. I
would like to modify the above-mentioned Console controls to check the page
name values, and possibly take one of the following actions if a name is
already found in the destination channel:
1. allow the author to be able to enter a new name value, then proceed
2. cancel action (and provide error message, if possible)
3. automatically add a suffix to the name values (ie "Copy1", "Copy2", ...)

I can set up a new console button, but I'm not sure:
-where to find the normal behavior script for each action
-if it is possible to do the options above resuing existing dialogue boxes

Anyone else done this?
Back to top
Stefan [MSFT]
Guest





Posted: Mon Oct 24, 2005 12:51 pm    Post subject: Re: CopyAction, MoveAction Modification Reply with quote

Hi Murray,

the normal behaviour scripts are generated by the original controls.
By deriving your controls from these controls you can access them using
base.ActionJavaScript.

Cheers,
Stefan

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

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"MurrayTh" <MurrayTh@discussions.microsoft.com> wrote in message
news:D7A2D056-9B52-4AF7-887E-F4B9F0A29531@microsoft.com...
Quote:
I have implemented an application-level PropertyChanging event handler to
evaluate the Name and Display Name values when a page is created or when
properties are modified. Besides checking naming rules, is checks to see
that the Name and Display Name values are unique in the channel. It works
fine.

However, if authors use Copy, Move, or Create a Connected Page, the event
handler does not run, as the properties are not changed. Therefore an
author
could still place a page with a duplicate Name or Display Name value. I
would like to modify the above-mentioned Console controls to check the
page
name values, and possibly take one of the following actions if a name is
already found in the destination channel:
1. allow the author to be able to enter a new name value, then proceed
2. cancel action (and provide error message, if possible)
3. automatically add a suffix to the name values (ie "Copy1", "Copy2",
...)

I can set up a new console button, but I'm not sure:
-where to find the normal behavior script for each action
-if it is possible to do the options above resuing existing dialogue boxes

Anyone else done this?
Back to top
MurrayTh
Guest





Posted: Mon Oct 24, 2005 4:51 pm    Post subject: Re: CopyAction, MoveAction Modification Reply with quote

Stefan,

I guess the easiest way to view the javascript for a console control is then
to just view the source of the generated page and find the appropriate
source? Is there a a general reference to refer to for the console controls?

Looking up the Copy and Move actions, the actions both just open a MCMS
dialogue window, and the dialogues seem to take it from there. Does this
mean I should create my own modified versions of the PageCopy and PageMove
dialogue boxes that will process the decisions the way I would like?

Murray


"Stefan [MSFT]" wrote:

Quote:
Hi Murray,

the normal behaviour scripts are generated by the original controls.
By deriving your controls from these controls you can access them using
base.ActionJavaScript.

Cheers,
Stefan

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

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"MurrayTh" <MurrayTh@discussions.microsoft.com> wrote in message
news:D7A2D056-9B52-4AF7-887E-F4B9F0A29531@microsoft.com...
I have implemented an application-level PropertyChanging event handler to
evaluate the Name and Display Name values when a page is created or when
properties are modified. Besides checking naming rules, is checks to see
that the Name and Display Name values are unique in the channel. It works
fine.

However, if authors use Copy, Move, or Create a Connected Page, the event
handler does not run, as the properties are not changed. Therefore an
author
could still place a page with a duplicate Name or Display Name value. I
would like to modify the above-mentioned Console controls to check the
page
name values, and possibly take one of the following actions if a name is
already found in the destination channel:
1. allow the author to be able to enter a new name value, then proceed
2. cancel action (and provide error message, if possible)
3. automatically add a suffix to the name values (ie "Copy1", "Copy2",
...)

I can set up a new console button, but I'm not sure:
-where to find the normal behavior script for each action
-if it is possible to do the options above resuing existing dialogue boxes

Anyone else done this?


Back to top
Stefan [MSFT]
Guest





Posted: Mon Oct 24, 2005 8:51 pm    Post subject: Re: CopyAction, MoveAction Modification Reply with quote

Hi Murray,

I would always derive from the orignal controls and just modify the
javascript (e.g. add some code at the beginning or the end.
This will ensure that your code will also work after hotfixes have been
installed which often modify the generated javascript code.

Cheers,
Stefan

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

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"MurrayTh" <MurrayTh@discussions.microsoft.com> wrote in message
news:CD8C2695-603B-4826-A839-F2429269DF8E@microsoft.com...
Quote:
Stefan,

I guess the easiest way to view the javascript for a console control is
then
to just view the source of the generated page and find the appropriate
source? Is there a a general reference to refer to for the console
controls?

Looking up the Copy and Move actions, the actions both just open a MCMS
dialogue window, and the dialogues seem to take it from there. Does this
mean I should create my own modified versions of the PageCopy and PageMove
dialogue boxes that will process the decisions the way I would like?

Murray


"Stefan [MSFT]" wrote:

Hi Murray,

the normal behaviour scripts are generated by the original controls.
By deriving your controls from these controls you can access them using
base.ActionJavaScript.

Cheers,
Stefan

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

New to MCMS?
Check out this book: Building Websites Using MCMS:
http://tinyurl.com/6zj44
----------------------


"MurrayTh" <MurrayTh@discussions.microsoft.com> wrote in message
news:D7A2D056-9B52-4AF7-887E-F4B9F0A29531@microsoft.com...
I have implemented an application-level PropertyChanging event handler
to
evaluate the Name and Display Name values when a page is created or
when
properties are modified. Besides checking naming rules, is checks to
see
that the Name and Display Name values are unique in the channel. It
works
fine.

However, if authors use Copy, Move, or Create a Connected Page, the
event
handler does not run, as the properties are not changed. Therefore an
author
could still place a page with a duplicate Name or Display Name value.
I
would like to modify the above-mentioned Console controls to check the
page
name values, and possibly take one of the following actions if a name
is
already found in the destination channel:
1. allow the author to be able to enter a new name value, then proceed
2. cancel action (and provide error message, if possible)
3. automatically add a suffix to the name values (ie "Copy1", "Copy2",
...)

I can set up a new console button, but I'm not sure:
-where to find the normal behavior script for each action
-if it is possible to do the options above resuing existing dialogue
boxes

Anyone else done this?


Back to top
MurrayTh
Guest





Posted: Mon Oct 31, 2005 9:51 pm    Post subject: Re: CopyAction, MoveAction Modification Reply with quote

Stefan,

Thanks for the clarification. In the case of Copy and Move actions, the
javascript opens MCMS dialogue boxes, and the dialogue boxes seem to take it
from there. I guess this means my custom action can derive from the original
control, but I will also have to create a new dialogue box that the action
opens, correct? Can I derive the new dialogue box from the from the
Microsoft.ContentManagement.WebAuthor.CMS.WebAuthor.Dialogs namespace and the
appropriate MCMS aspx pages?

To summarize, I want a control to:
-perform the same function as the Copy action, but also
-append the name fields if an existing page name is found

Can I :
1. Develop a custom "Copy and Append" Console control:
-derived from the original Copy action
-opens a custom "PageCopyAndAppend" dialogue box

2. Develop a "PageCopyAndAppend" dialogue box
-derived from
Microsoft.ContentManagement.WebAuthor.CMS.WebAuthor.Dialogs.PageCopy
and PageCopyDlg aspx pages
-alter the Selection Frame to process the new posting, altering the page
name if required



"Stefan [MSFT]" wrote:

Quote:
Hi Murray,

I would always derive from the orignal controls and just modify the
javascript (e.g. add some code at the beginning or the end.
This will ensure that your code will also work after hotfixes have been
installed which often modify the generated javascript code.

Cheers,
Stefan

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

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"MurrayTh" <MurrayTh@discussions.microsoft.com> wrote in message
news:CD8C2695-603B-4826-A839-F2429269DF8E@microsoft.com...
Stefan,

I guess the easiest way to view the javascript for a console control is
then
to just view the source of the generated page and find the appropriate
source? Is there a a general reference to refer to for the console
controls?

Looking up the Copy and Move actions, the actions both just open a MCMS
dialogue window, and the dialogues seem to take it from there. Does this
mean I should create my own modified versions of the PageCopy and PageMove
dialogue boxes that will process the decisions the way I would like?

Murray


"Stefan [MSFT]" wrote:

Hi Murray,

the normal behaviour scripts are generated by the original controls.
By deriving your controls from these controls you can access them using
base.ActionJavaScript.

Cheers,
Stefan

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

New to MCMS?
Check out this book: Building Websites Using MCMS:
http://tinyurl.com/6zj44
----------------------


"MurrayTh" <MurrayTh@discussions.microsoft.com> wrote in message
news:D7A2D056-9B52-4AF7-887E-F4B9F0A29531@microsoft.com...
I have implemented an application-level PropertyChanging event handler
to
evaluate the Name and Display Name values when a page is created or
when
properties are modified. Besides checking naming rules, is checks to
see
that the Name and Display Name values are unique in the channel. It
works
fine.

However, if authors use Copy, Move, or Create a Connected Page, the
event
handler does not run, as the properties are not changed. Therefore an
author
could still place a page with a duplicate Name or Display Name value.
I
would like to modify the above-mentioned Console controls to check the
page
name values, and possibly take one of the following actions if a name
is
already found in the destination channel:
1. allow the author to be able to enter a new name value, then proceed
2. cancel action (and provide error message, if possible)
3. automatically add a suffix to the name values (ie "Copy1", "Copy2",
...)

I can set up a new console button, but I'm not sure:
-where to find the normal behavior script for each action
-if it is possible to do the options above resuing existing dialogue
boxes

Anyone else done this?





Back to top
Stefan [MSFT]
Guest





Posted: Mon Nov 07, 2005 5:50 pm    Post subject: Re: CopyAction, MoveAction Modification Reply with quote

Hi Murray,

for the dialog boxes I would suggest to create your own dialogs.

Cheers,
Stefan

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

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"MurrayTh" <MurrayTh@discussions.microsoft.com> wrote in message
news:6B7E7F42-27E9-41C9-924A-546D2BD472FA@microsoft.com...
Quote:
Stefan,

Thanks for the clarification. In the case of Copy and Move actions, the
javascript opens MCMS dialogue boxes, and the dialogue boxes seem to take
it
from there. I guess this means my custom action can derive from the
original
control, but I will also have to create a new dialogue box that the action
opens, correct? Can I derive the new dialogue box from the from the
Microsoft.ContentManagement.WebAuthor.CMS.WebAuthor.Dialogs namespace and
the
appropriate MCMS aspx pages?

To summarize, I want a control to:
-perform the same function as the Copy action, but also
-append the name fields if an existing page name is found

Can I :
1. Develop a custom "Copy and Append" Console control:
-derived from the original Copy action
-opens a custom "PageCopyAndAppend" dialogue box

2. Develop a "PageCopyAndAppend" dialogue box
-derived from
Microsoft.ContentManagement.WebAuthor.CMS.WebAuthor.Dialogs.PageCopy
and PageCopyDlg aspx pages
-alter the Selection Frame to process the new posting, altering the page
name if required



"Stefan [MSFT]" wrote:

Hi Murray,

I would always derive from the orignal controls and just modify the
javascript (e.g. add some code at the beginning or the end.
This will ensure that your code will also work after hotfixes have been
installed which often modify the generated javascript code.

Cheers,
Stefan

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

New to MCMS?
Check out this book: Building Websites Using MCMS:
http://tinyurl.com/6zj44
----------------------


"MurrayTh" <MurrayTh@discussions.microsoft.com> wrote in message
news:CD8C2695-603B-4826-A839-F2429269DF8E@microsoft.com...
Stefan,

I guess the easiest way to view the javascript for a console control is
then
to just view the source of the generated page and find the appropriate
source? Is there a a general reference to refer to for the console
controls?

Looking up the Copy and Move actions, the actions both just open a MCMS
dialogue window, and the dialogues seem to take it from there. Does
this
mean I should create my own modified versions of the PageCopy and
PageMove
dialogue boxes that will process the decisions the way I would like?

Murray


"Stefan [MSFT]" wrote:

Hi Murray,

the normal behaviour scripts are generated by the original controls.
By deriving your controls from these controls you can access them
using
base.ActionJavaScript.

Cheers,
Stefan

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

New to MCMS?
Check out this book: Building Websites Using MCMS:
http://tinyurl.com/6zj44
----------------------


"MurrayTh" <MurrayTh@discussions.microsoft.com> wrote in message
news:D7A2D056-9B52-4AF7-887E-F4B9F0A29531@microsoft.com...
I have implemented an application-level PropertyChanging event
handler
to
evaluate the Name and Display Name values when a page is created or
when
properties are modified. Besides checking naming rules, is checks
to
see
that the Name and Display Name values are unique in the channel. It
works
fine.

However, if authors use Copy, Move, or Create a Connected Page, the
event
handler does not run, as the properties are not changed. Therefore
an
author
could still place a page with a duplicate Name or Display Name
value.
I
would like to modify the above-mentioned Console controls to check
the
page
name values, and possibly take one of the following actions if a
name
is
already found in the destination channel:
1. allow the author to be able to enter a new name value, then
proceed
2. cancel action (and provide error message, if possible)
3. automatically add a suffix to the name values (ie "Copy1",
"Copy2",
...)

I can set up a new console button, but I'm not sure:
-where to find the normal behavior script for each action
-if it is possible to do the options above resuing existing dialogue
boxes

Anyone else done this?





Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> CMS Server All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB