DateRangeButton closes when selecting an item in dropdown list if used in a specific panel

35 views
Skip to first unread message

Nicolas Micoud

unread,
Jun 12, 2024, 10:36:04 AM6/12/24
to iDempiere
Hi,

I have a strange behaviour on a specific panel with a DateRangeButton.
I click on the DateRangeButton icon, the panel opens.
I click on one of the dropdown list and when selecting an item, the panel closes.

2024-06-12 16_16_59-iDempiere — Mozilla Firefox.png

As it not reproducible in other places, I think the difference is because of the way the DateRangeButton is displayed.
In my panel, North > Vlayout > Hlayout > DateRangeButton.
Whereas in iDempiere, is Grid > Rows > Row

You can find code in attachment (I add the DateRangeButton on RequestWindow.java)

Should I switch to Rows or is there something that can be changed so it will work from my code?

Thanks,

Nicolas
diff.patch

Heng Sin Low

unread,
Jun 12, 2024, 10:54:57 AM6/12/24
to idem...@googlegroups.com
The panel is a popup so probably is an issue of focus - a popup auto close if focus goes outside of it.

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/a43c0279-ec9a-4d8f-b433-2f0cefb5ad33n%40googlegroups.com.

Nicolas Micoud

unread,
Jun 12, 2024, 11:40:41 AM6/12/24
to iDempiere
OK I see and indeed, if I open the DateRangePanel from a Row, the behaviour is the same.

row = rows.newRow();

row.appendChild(selDateFrom.getComponent());

row.appendChild(new Label(" - "));

row.appendChild(selDateTo.getComponent());

DateRangeButton drb2 = (new DateRangeButton(selDateFrom, selDateTo));

row.appendChild(drb2);


Any idea how to fix this focus issue?
Should I change the way the panel is opened?

Heng Sin Low

unread,
Jun 13, 2024, 5:47:42 AM6/13/24
to idem...@googlegroups.com
This is always reproducible, please create a jira ticket with the attached patch as the reproducible test case.

It seems caused by the combination of highlight window, popup and combobox (the problem goes away if you change the RequestWindow to overlapped mode) but 
I haven't found the solution for it yet.

On Wed, Jun 12, 2024 at 10:36 PM Nicolas Micoud <nicolas...@gmail.com> wrote:
--

Nicolas Micoud

unread,
Jun 13, 2024, 7:48:01 AM6/13/24
to iDempiere
Reply all
Reply to author
Forward
0 new messages