Is it possible to pass values ​​from the SDL Tridion 2011 GUI Extension to SaveEventArgs in an event handler

I am creating a GUI extension using SDL Tridion 2011 SP1. I want to collect some user data when the editor clicks on the new Save and Comment button. This button will collect user input and then run the built-in CME save commands.

Then, using an event handler, I would like to catch this user input and do some special processing with it. My simple event handler looks like this:

using System;
using System.Text;
using Tridion.ContentManager.Extensibility.Events;
using Tridion.ContentManager.Extensibility;
using Tridion.ContentManager.ContentManagement;
using System.IO;

namespace UrbanCherry.Net.SDLTridion.EventHandlers
{
  [TcmExtension("VersionCommenting")]
  public class VersionCommenting : TcmExtension
  {
    public VersionCommenting()
    {
      Subscribe();
    }

    public void Subscribe()
    {
      EventSystem.Subscribe<Component, SaveEventArgs>(AddCommentToItemVersion,
                                                      EventPhases.Initiated);
    }

    private void AddCommentToItemVersion(Component source, SaveEventArgs args,
                                         EventPhases phase)
    {
      //Do some work here   
    }
  }
}

Is it possible that my GUI extension will somehow add values ​​to SaveEventArgs, either using args.ContextVariables, or some other method?

+5
source share
2

GUI . , , , - . ( ) , XML- XML.

GUI , , , , "" .

, :

  • GUI, XML
  • ,

, Data Extenders: , , ( TCM).

, , Component XML .

, Component XML , pre-commit/post-commit. - , .

+1

, , GUI Extension, , ?

+1

All Articles