[Silk UI Web] Balloon stores old content in stead of edit value!

[Silk UI Web] Balloon stores old content in stead of edit value!

  
Forge Component
(70)
Published on 4 Oct (13 days ago) by OutSystems R&D
70 votes
Published on 4 Oct (13 days ago) by OutSystems R&D

We use the balloon widget to show extra edit fields (input box) in a webblock

We have seen several times no that on the server the old data is given in the onchange of the input.
Initial: 7
Change: 5
OnChange give 7 in stead of 5.

When we use the same webblock on another place is works fine.
I can not find out when it is okay and when it's broken because we use the same webblock.

I have created an eSpace to reproduce the problem.

Hi! 

Somehow, after publishing, your eSpace worked nicely.   ( I like your idea !)

Have you checked any javascript error in your page? Even unrelated errors can stop the proper behavior of subsequent scripts.

Hoping you find the solution

Graça Peixoto

If I debug I see the old value or 0 in the debugger.

There are no JavaScript errors. 

Like I said sometimes it works sometimes not :(

After refreshing the page, the old value is shown instead of the changed value, right?

It  seems that the field is not being updated in the database. I'm not sure yet, i need to do some more tests. 

G.

 

I got the field being updated in the database, since now, after testing, I have two fields set to zero. For some reason the value the user inputs to the field is not being sent to the Save action.


I will run some more tests


Regards,

Ângelo 

Ângelo Sousa wrote:

After refreshing the page, the old value is shown instead of the changed value, right?


Yes, that's the big bug / problem!

Ângelo Sousa wrote:

I got the field being updated in the database, since now, after testing, I have two fields set to zero. For some reason the value the user inputs to the field is not being sent to the Save action.


I will run some more tests


Regards,

Ângelo 


Exactly is a rather big bug right?

Hello Johan

I think the issue is related to the balloon being rendered in a WebBlock. As a test, I created the WebBlock as a WebScreen and it works perfectly. Have you tried having the CreateOrUpdate Action in the HomeScreen WebScreen and having only the Notify action in the WebBlock? 

Regards,

Ângelo

Hello Ângelo,

I have other cases in the code of the customer where the balloon is not in a WebBlock with the same issue.

If I have the same webblock on different place in the screens sometimes it works sometimes is does store the old value. I can not see when it works or not.

It unreliable but we need the functionality.


One + point:
If it works it keeps working, if not it keeps failing on every publish of the eSpace

Hello Johan

I am running some more tests, and after I run them, I can attach here the .oml file so you can see what I have done

Okay but I can not work with a notify that is no solution. Because it also happens when the balloon is not in a webblock. And the functionality is used on several pages so the functionality must be in a webblock.

Thanks!

I am trying to implement this in a WebBlock with a Notify action to the WebScreen that calls the WebBlock (it does not matter if the WebBlock is called in one or several pages). This would not be a solution?

No that would be no solution because I have to copy the code in the OnNotify on a lot of pages.

I think the developers of Silk UI should look at the bug because it could effect a lot if implementations.

Not sure if this is a Silk problem, but I think it's certainly a bug. I would encourage you to contact OutSystems support about this issue.

I cannot seem to have this working via WebBlock

If by any chance you, or the OutSystems team, can work this out, please let me know


Regards,

Ângelo

I have created a support case for our customer.
I have it working in a WebBlock but it is a guess where it will work and where not.
We test it every time we place it somewhere.

Thanks for your effort.

Hello Johan, the SilkUI Balloon is a webblock itself. You should use the Notify/OnNotify logic in order to perform database changes.

Best Regards

Hi Paulo,

That is not the problem. In the balloon there is a content area.
In this content area I have a self supporting webblock which can do all the things by itself.

Using the webblock outside the balloon it always works.Using the webblock in the balloon sometimes it works sometimes not. I could not have the balloon notify anything from my webblock inside the balloon. The balloon does not no any functionalitiy of my webblock. My webblock should notify the balloon and the balloon should notify the page and the page should store the value. That's not the way to go.

Johan

Since you don't want to replicate logic in all screens where you call the WebBlock (which makes total sense), I'd suggest you build a user action that encapsulates all the logic you need to update the database. This way, the only action you call on each WebPage will be this one. You won't replicate any logic, and if you need to make any alterations, you make them in only one place

Will this help?

Regards,

Ângelo

How will you call the action with the right new data because you get the old data in the onchange of the listbox?


Or is it working for you?