Topic
  • 5 replies
  • Latest Post - ‏2013-11-12T06:39:52Z by AnnaScherer
AnnaScherer
AnnaScherer
3 Posts

Pinned topic Automatically update dialog box after selection of a new object

‏2013-11-11T13:28:29Z |

Hi,

the dialog box of 'Object Properties' is updated automatically when a new object is selected. I tried to find a solution to implement this functionality in my DXL code.

Can somebody help me with this issue?

Thanks,

Anna

  • GregM_dxler
    GregM_dxler
    166 Posts
    ACCEPTED ANSWER

    Re: Automatically update dialog box after selection of a new object

    ‏2013-11-11T16:16:11Z  

    Hi Greg,

    thanks for your fast response.

    I have already worked with callback functions of dialog box elements. But when I understand them in the right way, they only fire when a dialog box element is changed, selected, activated, etc.

    Maybe, I haven't described my problem enough. I have a dialog box with fields and buttons. When I select a different object in the module the values of the fields in the dialog box shall be changed on the base of attribute values of the new selected object. The same functionality is implemented in the object properties dialog box (CTRL + E). For example, when I select an object and select 'Edit links'. The object properties dialog box is displayed and all links of the current object are stated. When I select a different object the object properties dialog box is automatically updated and all links of the new selected object are displayed.

    I hope this describe the problem in a better way.

    Regards

    Anna

     

    Hi Anna,

    I did a search in the forum for sync trigger and found this thread.  There is an example of a sync trigger there.

    https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014271926&ps=25

    Hope it helps,

    Greg

  • GregM_dxler
    GregM_dxler
    166 Posts

    Re: Automatically update dialog box after selection of a new object

    ‏2013-11-11T14:14:13Z  

    Hi Anna,

    The updates are usually done by putting them in callback functions. The callback functions are part of the dialog box elements.  Many of them have a set command, where the callback function is included.  To help me remember how this works, most of my callback functions call other functions, Update_Global_Variables, Update_Dialog_Box_Elements, etc.  The callback functions can also change the way the dialog box looks and acts.  For example, if the user selects an operation, then functions that are not related to that can be disabled.

    Hope this helps,

    Greg

  • AnnaScherer
    AnnaScherer
    3 Posts

    Re: Automatically update dialog box after selection of a new object

    ‏2013-11-11T15:02:14Z  

    Hi Anna,

    The updates are usually done by putting them in callback functions. The callback functions are part of the dialog box elements.  Many of them have a set command, where the callback function is included.  To help me remember how this works, most of my callback functions call other functions, Update_Global_Variables, Update_Dialog_Box_Elements, etc.  The callback functions can also change the way the dialog box looks and acts.  For example, if the user selects an operation, then functions that are not related to that can be disabled.

    Hope this helps,

    Greg

    Hi Greg,

    thanks for your fast response.

    I have already worked with callback functions of dialog box elements. But when I understand them in the right way, they only fire when a dialog box element is changed, selected, activated, etc.

    Maybe, I haven't described my problem enough. I have a dialog box with fields and buttons. When I select a different object in the module the values of the fields in the dialog box shall be changed on the base of attribute values of the new selected object. The same functionality is implemented in the object properties dialog box (CTRL + E). For example, when I select an object and select 'Edit links'. The object properties dialog box is displayed and all links of the current object are stated. When I select a different object the object properties dialog box is automatically updated and all links of the new selected object are displayed.

    I hope this describe the problem in a better way.

    Regards

    Anna

     

  • GregM_dxler
    GregM_dxler
    166 Posts

    Re: Automatically update dialog box after selection of a new object

    ‏2013-11-11T15:26:26Z  

    Hi Greg,

    thanks for your fast response.

    I have already worked with callback functions of dialog box elements. But when I understand them in the right way, they only fire when a dialog box element is changed, selected, activated, etc.

    Maybe, I haven't described my problem enough. I have a dialog box with fields and buttons. When I select a different object in the module the values of the fields in the dialog box shall be changed on the base of attribute values of the new selected object. The same functionality is implemented in the object properties dialog box (CTRL + E). For example, when I select an object and select 'Edit links'. The object properties dialog box is displayed and all links of the current object are stated. When I select a different object the object properties dialog box is automatically updated and all links of the new selected object are displayed.

    I hope this describe the problem in a better way.

    Regards

    Anna

     

    Hi Anna,

    Sorry for not understanding your issue.  I've tried to do that also, automatic update and wasn't able to find a way directly.  So I opt'ed to add a button to "Load Current Object" that the user must use whenever they change the object selection.  Also added a load next object and a load previous object to help.  Of course, these buttons fire a callback function to do the updates.

    It sounds like the only way to do this is to make a trigger that would fire when the user changes object selection.  There is a sync trigger event that looks like it would be applicable.  Maybe someone else in the forum has experience with adding this kind of trigger.  I've been reluctant to work on triggers because I've heard it is the devil's work. ;-)

    Greg

    Updated on 2013-11-11T15:26:57Z at 2013-11-11T15:26:57Z by GregM_dxler
  • GregM_dxler
    GregM_dxler
    166 Posts

    Re: Automatically update dialog box after selection of a new object

    ‏2013-11-11T16:16:11Z  

    Hi Greg,

    thanks for your fast response.

    I have already worked with callback functions of dialog box elements. But when I understand them in the right way, they only fire when a dialog box element is changed, selected, activated, etc.

    Maybe, I haven't described my problem enough. I have a dialog box with fields and buttons. When I select a different object in the module the values of the fields in the dialog box shall be changed on the base of attribute values of the new selected object. The same functionality is implemented in the object properties dialog box (CTRL + E). For example, when I select an object and select 'Edit links'. The object properties dialog box is displayed and all links of the current object are stated. When I select a different object the object properties dialog box is automatically updated and all links of the new selected object are displayed.

    I hope this describe the problem in a better way.

    Regards

    Anna

     

    Hi Anna,

    I did a search in the forum for sync trigger and found this thread.  There is an example of a sync trigger there.

    https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014271926&ps=25

    Hope it helps,

    Greg

  • AnnaScherer
    AnnaScherer
    3 Posts

    Re: Automatically update dialog box after selection of a new object

    ‏2013-11-12T06:39:52Z  

    Hi Anna,

    I did a search in the forum for sync trigger and found this thread.  There is an example of a sync trigger there.

    https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014271926&ps=25

    Hope it helps,

    Greg

    Hi Greg,

    thanks :-)

    The link helped me. Before I started the topic I searched for 2 hours, but sometimes it is difficult to find the right search term.

    Regards

    Anna