Skip to content

Commit a41af91

Browse files
authored
Progress.hide() does not work when called from Static Progress EXO (#483)
* Use $ for explicit log name * Always send progress to Client. Do not check if it running. * Remove running var
1 parent 32ca569 commit a41af91

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

common/src/main/java/com/genexus/diagnostics/UserLog.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ public static ILogger getMainLogger() {
1919
private static ILogger getLogger(String topic) {
2020
ILogger log;
2121
if (topic != null && topic.length() > 0) {
22-
log = LogManager.getLogger(String.format("%s.%s", defaultUserLogNamespace, topic.trim()));
22+
String loggerName = topic.startsWith("$") ? topic.substring(1): String.format("%s.%s", defaultUserLogNamespace, topic.trim());
23+
log = LogManager.getLogger(loggerName);
2324
}
2425
else {
2526
log = getMainLogger();

java/src/main/java/com/genexus/internet/GXWebProgressIndicator.java

+5-14
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ public class GXWebProgressIndicator
88
private GXWebNotification notification;
99
private GXWebProgressIndicatorInfo info;
1010
private ModelContext context;
11-
private boolean running = false;
12-
1311

1412
public GXWebProgressIndicator(ModelContext gxContext)
1513
{
@@ -20,34 +18,28 @@ public GXWebProgressIndicator(ModelContext gxContext)
2018

2119
public void show()
2220
{
23-
running = true;
2421
setAction("0");
2522
updateProgress();
2623
}
2724

2825
private void updateProgress()
2926
{
30-
if (running)
31-
{
32-
GXWebNotificationInfo notif = new GXWebNotificationInfo(0,context,"");
33-
notif.setId(GXWebProgressIndicator.ID);
34-
notif.setGroupName(GXWebProgressIndicator.ID);
35-
notif.setMessage(info);
36-
notification.notify(notif);
37-
}
27+
GXWebNotificationInfo notif = new GXWebNotificationInfo(0,context,"");
28+
notif.setId(GXWebProgressIndicator.ID);
29+
notif.setGroupName(GXWebProgressIndicator.ID);
30+
notif.setMessage(info);
31+
notification.notify(notif);
3832
}
3933

4034
public void showWithTitle(String title)
4135
{
42-
running = true;
4336
setTitle(title);
4437
setAction("1");
4538
updateProgress();
4639
}
4740

4841
public void showWithTitleAndDescription(String title, String desc)
4942
{
50-
running = true;
5143
setTitle(title);
5244
setDescription(desc);
5345
setAction("2");
@@ -58,7 +50,6 @@ public void hide()
5850
{
5951
setAction("3");
6052
updateProgress();
61-
running = false;
6253
}
6354

6455
private String getAction() {

0 commit comments

Comments
 (0)