When changing to edit mode, the user double clicks and that sets edit mode, which is great. It then requires a further click over the field group to make whatever field you are hovering over become the selected field. Is there anyway you can think of that would allow the field you are hovering over to be selected as a result of the ‘double click’ event that started ‘edit mode’?
Many Thanks
Hi,
Unfortunately, it’s unclear what you want to achieve. Could you please describe in more details?
Regards,
Gleb
Hi,
With a single tab and a field group,it’s straightforward to edit a field in a fieldgroup by a) selecting record from list b) pressing Enter and c) clicking on field to edit. However, when there are 2 tabs, as soon as you click on the 2nd tab label, the focus moves so that the ‘Enter’ shortcut doesn’t work until you reselect the row.
There are 2 things I’d like to achieve. The first is that when you click on a tab label, pressing ‘Enter’ as the next action puts the ‘form’ in edit mode for the currently selected record
The second is to be able to do this:
a) Open Customer Form
b) Click on Expression tab
c) double click with the mouse on ‘Expression Field’ in the field group which would put the form in edit mode and put the cursor in the ‘Expression Field’
test060819.zip (82.5 KB)
Many Thanks:)))
Thank you for demo project, it helped a lot.
That is expected behavior as Enter listener is added to the table. In order to achieve this:
You need to declare a global screen action with Enter shortcut in screen’s XML in the <actions>
element above <layout>
:
<actions>
...
<action id="enterAction"
invoke="onEnterPress"
shortcut="${TABLE_EDIT_SHORTCUT}"/>
</actions>
and provide its implementation:
public void onEnterPress() {
Action editAction = getTable().getActionNN(EditAction.ACTION_ID);
editAction.actionPerform(null);
}
As for the second requirement, unfortunately, it’s impossible since the LayoutClickEvent
doesn’t provide info about a clicked component, which is somewhere inside the parent layout on which the listener was registered.
Gleb