Title: Template customisation Post by: Aurora E. on June 01, 2011, 12:58:25 pm Hi,
I want to customize the popup menu of the Javascript template because I want to put the focus on the default item as defined in the fgl_winquestion call. Sadly I cannot find the right attribute of the Action Item to check. Has someone found a way to do this? Best regards, Aurora Title: Re: Template customisation Post by: Sisavanh S. on June 01, 2011, 05:53:02 pm Hi,
I don't understand your issue. Normally, the focus is set by the DVM and the front end put it on the right field. Please, contact your local support center for such issue. They will give you advise on template customization. Many regards, Title: Re: Template customisation Post by: Reuben B. on June 02, 2011, 11:39:20 am Sisa,
I think you misunderstood the question. The question wasn't in relation to putting the focus on a field, it was in relation to putting the focus on an action when in a MENU statement. Compare these lines of code DISPLAY FGL_WINQUESTION("Title","Message","yes","yes|no","stop",0) DISPLAY FGL_WINQUESTION("Title","Message","no","yes|no","stop",0) or MENU "" COMMAND "Yes" NEXT OPTION "No" COMMAND "No" NEXT OPTION "Yes" COMMAND "Exit" EXIT MENU END MENU in both the GDC and GWC In GDC in a MENU, a menu option has the focus, is rendered differently, and the user can press Enter to select it. In GWC out of the box that doesn't happen. Without trying it first, the Action node does have an attribute hasFocus https://4js.com/online_documentation/fjs-gas-manual-html/User/TPLRef2_PathsWindow.html#PATH_ACTION so I figure you ought to be able to render the Menu Action that has focus differently by interrogating that value. However what I'm not sure is how you could get it so that when ENTER is pressed it looks up the action that has the focus and triggers it. Reuben |