EGL Development User Group

  • 1.  How to add a text in an existed Widget.

    Posted Wed December 16, 2020 05:18 PM

    Dear Experts,

    I have post some questions in this forum, and got help. Thanks again for your help.

    I have widgets  of type HotSpotView which was created by a third party. they response click action. But they are  blank on UI page, no title or text displayed. I need a text or title for each of them, just like buttons which has text such as Save, Exit, Refresh, etc.

    The parents in the hierarchy :  (lowest)  HotSpotView <-- PrimitiveView  <-- BasicView <-- Widget  (highest lever, it is prob

    ably from IBM ). The  following is the definition of them. 

    SPOTL2 HotSpotView {
      position = "absolute",
      backgroundColor = "grey80",// "#EDB041",
      layoutData = new AttachmentLayoutData{
      attachmentTypeTop = CommonLibrary.ViewLib.TYPE_PARENT, offsetTop = 141,
      attachmentTypeLeft = CommonLibrary.ViewLib.TYPE_PARENT, offsetLeft = 260,
      attachmentTypeRight = CommonLibrary.ViewLib.TYPE_OPPOSITE, offsetRight = 100,
      attachmentTypeBottom = CommonLibrary.ViewLib.TYPE_OPPOSITE, offsetBottom = 18
    }
    //,background= "url(images/YTDUB/YTDUBL2.png) no-repeat"
    };

    HotSpotView:
    package com.sync.gt2.egl.rui.vast.widgets;
    ExternalType HotSpotView Extends PrimitiveView type JavaScriptObject{
      relativePath = "com/sync/gt2/egl/rui/vast/widgets",
      javaScriptName = "HotSpotView",
      @VEWidget{
      category = "VAST Widgets",
      template = "${typeName}{}",
      displayName = "HotSpotView"
         }
      }
      beepDuration int{@JavaScriptProperty, @VEProperty};
      beepFrequency int{@JavaScriptProperty, @VEProperty};
      beepOnClick Boolean { @JavaScriptProperty {}, @VEProperty };
    end

    PrimitiveView:
    package com.sync.gt2.egl.rui.vast.widgets;
    ExternalType PrimitiveView Extends BasicView type JavaScriptObject{
      relativePath = "com/sync/gt2/egl/rui/vast/widgets",
      javaScriptName = "PrimitiveView"
      }

    End

    BasicView:
    package com.sync.gt2.egl.rui.vast.widgets;
        ExternalType BasicView extends Widget type JavaScriptObject {
        relativePath = "com/sync/gt2/egl/rui/vast/widgets",
        javaScriptName = "BasicView",
        includeFile = "includeDojo.html"
      }
      borderWidth int{@JavaScriptProperty, @VEProperty};
      enabled boolean {@JavaScriptProperty, @VEProperty};
      foregroundColor  string{@JavaScriptProperty, @VEProperty};
      helpTopicId  string{@JavaScriptProperty, @VEProperty};
      helpTitle  string{@JavaScriptProperty, @VEProperty};
      helpFile  string{@JavaScriptProperty, @VEProperty};
     helpKeysId  string { @JavaScriptProperty {}, @VEProperty };
      tabGroup  boolean{@JavaScriptProperty, @VEProperty};
      traversalOn  boolean{@JavaScriptProperty, @VEProperty};
      dragDropSpec  any { @JavaScriptProperty {} };
      mappedWhenManaged boolean {@JavaScriptProperty{}, @VEProperty};

      function setFocus();
      function vaShow();
      function hide();
      function destroyPart();
      function executeCloseWidgetCommand();
      function isMapped() returns(boolean);
      function closeWidget();
    end

    Please teach me how to add text to be displayed on UI page. Please help. Thank you,

    Eric



    ------------------------------
    Eric Zuo
    ------------------------------


  • 2.  RE: How to add a text in an existed Widget.

    Posted Thu December 17, 2020 02:12 AM

    Hello Eric,
    When you're not using the IBM components it isn't easy to tell how to add text to an existing widget. 

    For example: if you're using a Rich UI Div or a Rich UI Box then it's easy to say div1.addChild. 
    But when you're using a Rich UI Grid Layout as parent you have to add the textfield as child but you also have to tell
    on which row and column you want to do that, using the GridLayoutData. 

    https://www.ibm.com/support/knowledgecenter/en/SSMQ79_9.6.0/com.ibm.egl.lr.doc/topics/regl_ui_richui_gridlayout.html

    Your HotSpotView has also some attributes like AttachmentLayoutData so maybe it is based on the GridLayout.

    Best thing is to check the documentation from the third party. 

    Greetings, Jeroen



    ------------------------------
    Jeroen Dielemans
    ------------------------------



  • 3.  RE: How to add a text in an existed Widget.

    InnerCircle
    Posted Thu December 17, 2020 03:27 AM

    Hi Eric,

     

    The widget HotSpotView is an externalType which means there is a corresponding javascript file served as the implementation. The file is specified in

     

      relativePath = "com/sync/gt2/egl/rui/vast/widgets",
      javaScriptName = "HotSpotView",

     

    Check the javascript file HotSpotView.js, you would have some ideas.

     

    Regards,

    JiYong Huang

    Senior Technical Specialist

    RBD, HCL Software, HCL Technologies Ltd.

    Cell: +86-13426427893

    EGL Development User Group

    www.hcl.com

     

    ::DISCLAIMER::

    The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.






  • 4.  RE: How to add a text in an existed Widget.

    Posted Wed December 23, 2020 12:08 PM

    Hi Jeroen,  JiYong,

    I find it is hard to add the text, particularly the jsp from the third party is very complicate.  I have to find a workaround, and I did it.

    Thank for your instruction. It saved my time.

    Sincerely,

    Eric



    ------------------------------
    Eric Zuo
    ------------------------------