I have an AbstractJavaScriptComponent that uses jQuery. It has buttons on it to add entities, at the moment I am using URLs that direct to e.g. open?screen=entity$Entity.edit&item=entity$Entity-112532-sda-3324-323-
However that is very slow, and I’m sure there is a better way to on click, go back to the server and just display the edit screen in a Dialog or new tab - how would I go about doing that?
Thanks for the reply. Given the click-through how would I then redirect the user to either a Dialog or a new tab showing the edit screen from the component class?
Use the openEditor() method to open editor screen. You can specify how to open the screen: DIALOG, NEW_TAB, THIS_TAB. Read more in the documentation here and here.
Pay attention that the openEditor() method is available in a screen controller. If you need to obtain the current frame to open an editor from a component class, you can use the following:
Thanks, sorry for so many questions, but got to the point where I’m trying the openEditor command you give above, but it requires a WindowInfo parameter as the first param - I’m assuming I need to create a new WindowInfo(“screen$Sample”, [What goes here?])
The second parameter is an Element which needs to be the element of the screen.xml? How do I get that?