Uniface User Forum

 View Only
  • 1.  Widget Type

    Posted 12-20-2023 09:24

    Is there a way to know a FRM Widget type of a field on runtime? I would like to be able to set some properties on runtime if the widget type is uHTML 



    ------------------------------
    Yuen Chong
    Mrs
    Rocket Forum Shared Account
    ------------------------------


  • 2.  RE: Widget Type

    PARTNER
    Posted 12-21-2023 04:57

    Hi,

    I think about two solutions :

    The quick:

    $fieldhandle(uhtml)->$widgetoperation("js:test")

    If status=0 it's an html widget 

    ("test"  javascript function may not exist) 

    The corporate :

    Define an constant value to identify your widget ( in a widget template , or entity ...)

    Gilles.



    ------------------------------
    Hortion Gilles
    Dedalus Healthcare France
    Artigues Pres Bordeaux FR
    ------------------------------



  • 3.  RE: Widget Type

    PARTNER
    Posted 12-21-2023 08:18

    Yeah, I work with Yuen, and we are going with writing a program to check the repository and add a property of "ISHTML=T" to the properties of the widgets based on the settings in UXFIELD and UCFIELD, (or manually by the developer) but we were hoping for something a little more "built in". 

    We have global procs which change field attributes based on user permissions, but we have discovered making the HTML widget 'dim' renders it dysfunctional so we are trying to implement a system wide change which can recognise HTML fields, and skip the code. 

    Regards, 

    Iain



    ------------------------------
    Iain Sharp
    Head of Technical Services
    Pci Systems Ltd
    Sheffield GB
    ------------------------------