InfoWindow auto refresh

163 views
Skip to first unread message

Leszek Bober

unread,
Mar 25, 2021, 11:11:39 AM3/25/21
to iDempiere
Hi All
is it possible in InfOWindow that after typing and exiting the (Query Criteria) field, Query would run in the background  without having to click on the Refresh button?

Regards
Leszek Bober

Syed

unread,
Apr 24, 2021, 8:05:24 AM4/24/21
to iDempiere
Hi,
Did you achive it?

Leszek Bober

unread,
Apr 26, 2021, 4:32:26 AM4/26/21
to iDempiere
Hi Syed,
No, I'm don't achive.
I don't work for slove this solution.

Syed

unread,
Apr 26, 2021, 5:48:37 AM4/26/21
to iDempiere
I have solved it by referring, Kanban board's auto refresh functionality.

Here is the solution:

info1.pnginfo2.pnginfo3.png

Leszek Bober

unread,
Apr 26, 2021, 7:36:17 AM4/26/21
to iDempiere
Hi Syed,
Do you make a plugin or patch?

Regards
Leszek Bober

Norbert Bede

unread,
Apr 26, 2021, 7:41:07 AM4/26/21
to iDempiere
hi, this would be reasonable implement into the core if doesn't implemented yet. norbert

Leszek Bober

unread,
Apr 26, 2021, 8:05:22 AM4/26/21
to iDempiere
Hi
I'm make plugin and share it.

Regards
Leszek Bober

Carlos Antonio Ruiz Gomez

unread,
Apr 26, 2021, 8:42:58 AM4/26/21
to idem...@googlegroups.com
Maybe better a pull request than a plugin.


Am 26.04.21 um 14:05 schrieb Leszek Bober:

Leszek Bober

unread,
Apr 26, 2021, 9:01:36 AM4/26/21
to iDempiere
Hi Carlos,
I'm using a 7.1 version 
I think so plugin is a better solution for me.

Syed

unread,
Apr 26, 2021, 10:28:03 AM4/26/21
to iDempiere
It's a patch in 5.1. I am still using 5.1, not migrated to the latest version yet.

Maybe Carlos or someone else can directly add these changes in the latest version.

reua...@gmail.com

unread,
Apr 26, 2021, 11:10:16 AM4/26/21
to iDempiere
I am afraid, I just don't get it. What is the logic of using a timer to react on a well defined user action? That does not make any sense to me.
Wouldn't it be more appropriate to just send an event when the field loses focus and let the event handler reload the data?
Where is the problem with that approach?
Please explain!
Thanks

Andreas

Leszek Bober

unread,
Apr 26, 2021, 12:43:36 PM4/26/21
to iDempiere
Hi Andreas,
Your suggestion is send reload data after lose first field in search query?
Could you tell me what event I should use?

Regards
Leszek Bober

reua...@gmail.com

unread,
Apr 26, 2021, 5:46:36 PM4/26/21
to iDempiere
That would be Events.ON_BLUR. I admit I haven't used it myself but I am pretty confident that it should do the trick.
You would have to listen to all fields that you want to be triggering the reload. That would of course cause another reload for each field that gets edited.
Still I think you should be better of using event control instead of a periodic reload.
I don't think that ZK has an event that could give you the destination of a focus change. So AFAIK that is not an option to reload only after the last parameter has been edited.
If the window uses a complex query and/or lots of parameter fields you might try experimenting with some kind of relais that listens to ON_FOCUS and ON_BLUR of all the parameter fields and that uses a timer (not periodic)
that starts on blur and gets killed on focus. The idea is to only echo the event if the timer does not get killed. This requires a bit of experimenting with delay times but might be beneficial if the query is expensive. 

Andreas

Carlos Antonio Ruiz Gómez

unread,
Apr 27, 2021, 12:27:18 AM4/27/21
to iDempiere
Reloading on every field change is not good for info windows with too many records, or too slow

Maybe a shortcut for the refresh button could do the trick for users?


--
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/d9ab076f-1f48-4965-b751-a4d52173c7e7n%40googlegroups.com.

Syed

unread,
Apr 27, 2021, 1:14:48 AM4/27/21
to iDempiere
The reason for using the Timer:
Today's sales summary by customer and product should be shown in the info window which always shows up to date without refreshing it.

Carlos Antonio Ruiz Gomez

unread,
Apr 27, 2021, 1:35:14 AM4/27/21
to idem...@googlegroups.com
> What is the logic of using a timer to react on a well defined user action?

This is a different use case to what was suggested in the start of this thread.

I think it is for showing information, like when you add a TV on your warehouse to show documents in process.

Regards,

Carlos Ruiz



Am 26.04.21 um 17:10 schrieb reua...@gmail.com:

reua...@gmail.com

unread,
Apr 27, 2021, 3:03:45 AM4/27/21
to iDempiere
Thanks Syed and Carlos for the clarification.
It seems I was barking up the wrong tree. :)

Andreas
Reply all
Reply to author
Forward
0 new messages