If you are not using Afaria to manage application settings, your Kapsel Logon Screen presents a list of choices that might seem a bit formidable to your end users. This article describes an quick and easy change to your SMP SDK installation that will limit the Logon UI to the most common choices needed by users.


Screen Shot 2015-09-15 at 3.50.25 PM.png

The default SMP Logon Screen exposes choices to the user that you might not want to show (SMP 3 SDK SP09; iOS screen)

The SMP SDK offers support for many different styles of security integration.  In many of those cases, though, we simply need to obtain the user’s id and password to authenticate the device for SMP or HCPms access.  It turns out that you can modify a single file in your SMP SDK Kapsel installation directory to change this for all new Kapsel applications you might create. The JavaScript file path is <install_location>/KapselSDK/plugins/logon/www/common/modules/StaticScreens.js ; the passage of code you’ll want to modify starts around line 143 of the file (at least that’s the location in SMP3 SDK SP10 PL09, you line number may vary).

The code you will want to add are the “visible: false” values. I suggest making a backup copy of the file before you save your edits.


       'SCR_REGISTRATION': {
            id: 'SCR_REGISTRATION',
            nav: {
                submit: {
                },
        cancel: {
        }
            },
            fields: {
                      serverHost : {
                           uiKey:'FLD_HOST',
                           editable:true,
                            visible:false
                      },
                        user : {
                            uiKey:'FLD_USER'
                        },
                        password : {
                            uiKey:'FLD_PASS',
                            type: 'password'
                        },
                        resourcePath : {
                            uiKey:'FLD_RESOURCE_PATH',
                            visible:false
                        },
                        https: {
                            uiKey:'FLD_IS_HTTPS',
                            type: 'switch',
                            'default':false,
                            visible:false
                        },
                        serverPort : {
                            uiKey:'FLD_PORT',
                            type: 'number',
                            editable:true,
                            visible:false
                        },
                        farmId : {
                            uiKey:'FLD_FARMID',
                            visible:false
                        },
                        communicatorId : {
                            uiKey: 'FLD_COMMUNICATORID',
                            'default':'REST',
                            visible:false
                        },
                        securityConfig: {
                            uiKey:'FLD_SECCONF',
                            visible:false
                        },
            }
        },

Save these changes under the same filename.

You should now be able to see a much cleaner Login UI in any new Kapsel project you create — either from the kapsel / cordova shell commands or using Web IDE’s Hybrid Application Toolkit.  You can also update an existing project by finding and changing the file in the Cordova project’s source  tree — since I use the Hybrid App Toolkit frequently, though, I find it much more convenient to change the default directly in the SDK directory as I have shown here.

Enjoy.

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Ludo Noens

    Wouldn’t it be great if we could configure and generate this from Hybrid Application Toolkit ?

    I’m going to enter an enhancement request for HAT.

    (0) 
    1. Gregor Wolf

      Hi Ludo,

      I’ve used the template sap.ui.ui5-template-plugin.2masterdetail in Web IDE with the checkbox mobile enable and in the projects settings I see this:

      Is that what you’re asking for?

      Best regards
      Gregor

      (0) 
      1. Ludo Noens

        Hi Gregor,

        Sorry for the late reply, did not check the blogs for a while…

         

        Yes, this is what we implemented last year in HAT (local add-on), based on user feedback, including this post.

         

        Regards,

        Ludo Noens

        Product Owner, Fiori Mobile DevX (which includes HAT)

        (0) 
  2. Ehtesham Abul

    Hi Ludo,
    I am using HAT version v1.25.3 and SMP SDK version SP14 .I am developing application using SAPUI5 Master Details Kapsel application template(fioritemplate.UI5masterDetailKapsel) in SAP WEB IDE and  I do not get setting as Gregor getting for Kapsel logon manger  .The project type shows it is for mobile .How I can solve this problem ?

    I get simplified logon manger UI only  for template “sap.ui.ui5-template-plugin.2masterdetail”.

    I think simplified logon manager UI  for HAT Local Add-On is not available for template ” fioritemplate.UI5masterDetailKapse”

     

    Thanks and Regards,
    Abul Ehtesham

    (0) 

Leave a Reply