Developer Programs

Learn

Docs

AppData

API Reference > AppData
SoapActionn/a
Input NameAppData
Output NameAppDataResponse
Input Namespacen/a
Group NameXperience
ContainerXP_MsgBus.xsd
AppData.cs
// Allows the application to change the title bar and status bar strings.
// The request can be made by any application including itself.
// If AppId is blank, changes will be applied to the requesting application window's tab.
// If AppId is supplied and exists, the changes will be applied to that application's tab.
// If WinId is blank, the changes will be applied to the main application window's tab.
// If WinId is supplied and exists, the changes will be applied to that child window.
// The requested WinId must be a child or the main window of the AppId.
// If both the ‘TitlebarVectorImgCode’ and ‘TitlebarIcon’ are supplied, the vector image
// will be shown.
// The ‘TitlebarVectorImgCode’ must be a valid code based on the JHAWPFCtrls that Xperience
// references to be valid.  If the code is not valid, the ‘TitlebarIcon’ will be used, if
// supplied.  If not supplied, the icon will not be changed.
AppDataRq_MType request = new AppDataRq_MType()
{
    HostId = hostedWindowBase.WindowId,
        StatbarTxt = "Change the Window Status",
    TitlebarTxt = "New Window Title",
    TitlebarVectorImgCode = JHAControls.WPF.JHAStandardVectorIcon.IconTypes.Wizard.ToString(),
        TitlebarIcon = Convert.FromBase64String(
                this.CreateBase64ImageFromResource("Demo.Images.splashButterfly.png"))
};
Helper.FillHeader(request);

this.messageBus
.Send(request)
.RegisterResponseHandler(this.OnApplicationDataColorChangeResponse);

/////////////////////////////////////////////////////////

AppDataRq_MType request = new AppDataRq_MType()
{
    ThemeContext = new ThemeContext_CType()
    {
        ColorType = "Tang"
    }
};

var hostedWindow = XperienceContext.Current.WindowManager.GetByContentInstance(this);

if (hostedWindow != null)
{
    request.HostId = hostedWindow.WindowId;

    Window window = hostedWindow.GetWindow();

    JHAThemeManager.LoadThemeForOneElement(
        window,
        ThemeChangeMessageHandler.CurrentApplicationTheme,
        JHAThemeManager.JHAThemeColors.Tangerine,
        string.Empty);


    var childWindowHosts = XperienceContext.Current.WindowManager.GetChildren(hostedWindow);

    if (childWindowHosts != null)
    {
        foreach (var child in childWindowHosts)
        {
            Window childWindow = child.GetWindow();

            JHAThemeManager.LoadThemeForOneElement(
                childWindow,
                ThemeChangeMessageHandler.CurrentApplicationTheme,
                JHAThemeManager.JHAThemeColors.Tangerine,
                string.Empty);
        }
    }
}

MessageHelper.FillHeader(request);

this.messageBus
.Send(request)
.RegisterResponseHandler(this.OnApplicationDataColorChangeResponse);
AppData.js
var request = new jackHenry.xperience.businessObjects.AppData();
    request.StatbarTxt = "New Status";
    request.TitlebarTxt = "New Title";

    sampleXPWebProductAngular.Helper.FillHeader(request);
    var responceCallback = jackHenry.xperience.messageBus.send(request).registerResponseHandler(onChangeTitleCallback);


var request = new jackHenry.xperience.businessObjects.AppData();
    request.ThemeContext = new jackHenry.xperience.businessObjects.ThemeContext_CType();
    request.ThemeContext.ColorType = "Tang";

    sampleXPWebProductAngular.Helper.FillHeader(request);

    var responceCallback = jackHenry.xperience.messageBus.send(request).registerResponseHandler(onChangeColorCallback);

Did this page help you?

Last updated Mon Dec 9 2024