I found a small bug. In the Script editing panel, the TAB key does not work correctly (tab is not inserted).
Marcin
I found a small bug. In the Script editing panel, the TAB key does not work correctly (tab is not inserted).
Marcin
Hi,
Actualliy, this problem is related to a 3-rd party component that we use - AceEditor.
You also can reproduce this issue with the SourceCodeEditor
component.
I created a ticket in YouTrack: link.
Regards,
Daniil.
Update: it is not a bug. This behavior is defined by design.
To change this behavior for the SourceCodeEditor
you can use the following feature: documentation.
Regards,
Daniil.
I’m sorry, I wrote it inaccurately. This behaviour (handleTabKey=true) is not set in the Report plugin (in Script editor)
Regards,
Marcin
Hi,
I’ve answered on your question in the previous comment - script editor works as it should by design.
Regards,
Daniil.
Yes, I understand, but why CUBA Developer Team did not set this property (handleTabKey) on true in Report module. I can’t do this because this SourceCodeEdit component is in Report module not directly in my application.
Regards,
Marcin
It seems that you are misunderstanding what i’m saying.
handleTabKey
property was deliberately set to false
for the SourceCodeEditor
component which is used as report script editor. Script editor does not handle the Tab
key by design.
Regards,
Daniil
I understand.
But In my opinion this property should be set to true, because is hard to format large code (SQL for example) with space key.
Maybe a function “Format code” would be useful?
Regard
Marcin
We decided that the Tab key should be used for switching between fields on this screen.
If you want to change this behavior you should extend a screen in CUBA Studio:
and write few lines of code in screen controller.
public class ExtBandDefinitionEditor extends BandDefinitionEditor {
@Override
public void init(Map<String, Object> params) {
super.init(params);
dataSetScriptField.setHandleTabKey(true);
}
}
Please notice, that you will not be able to move focus from this field if you will enable the handleTabKey
setting.
Also, I’ve created a ticket to improve usability of this field: YouTrack.
Regards,
Daniil