17
Views
14
Comments
Solved
Refreshing Inputs of a WebBlock
Application Type
Traditional Web

Hi guys,

I need some help with using web blocks please.

I have a list to display a series of locations. These locations can be renamed therefore I have created a web block where the user can choose 'rename' / 'remove' and enter the renamed location. (Using a web block as this pattern needs to be reused in other elements of the application).

When the original location name changes, I need to research the inputs from the list to the web block. Currently I am doing an ajax refresh of the web block in the on notify for the original location input. But this ajax refresh isn't working.

I assume web block don't work like this, however not sure what the correct approach should be.

Hopefully the screenshots below supports my explanation! Thanks!

Rank: #4761
Solution

Hi all, I figured it out in the end. As I was using as list, I need to refresh the list widget to update new values I was entering.

Thanks for your help!

Asha

mvp_badge
MVP
Rank: #2

Hi Asha,

An Ajax Refresh should work. Have you debugged to see whether the Ajax Refresh triggers the Preperation of the Web Block?

Rank: #4761

Hiya, no the ajax does not trigger the preparation of the web block!

mvp_badge
MVP
Rank: #2
Rank: #4761

Hi Kilian, I can't unfortunately as it is a company project.

mvp_badge
MVP
Rank: #2

I feared as much, but without a module it's difficult to determine what goes wrong. Just to be sure, in the OnNotify you Ajax Refresh the Web Block itself? Or an outer Container?

Rank: #4761

Yes sorry about that! I'm refreshing the WB itself. But I did also try with the outer container and this also didn't work. 

mvp_badge
MVP
Rank: #2

Here's an example module that shows it working, both with a button and with a notify.

TestWebBlockRefresh.oml

Hi Asha,

As mentioned by Killian, ajax should work for that. I think you lack the event trigger parameters to update the attributes of the List_CarrierLocations for the On Notify.

Thank you and kind regards,

Chris

Rank: #4761

Hi Chris,

I'm not using Events (maybe this is the problem).

mvp_badge
MVP
Rank: #2

No, events are for signalling from the Web Block to the Screen, not the other way around.

Rank: #4761

Thanks for confirming, I thought this was the case!

Thanks for clarifying Kilian. I misunderstood the thought of the question.

Hi Asha,

I think you should review the values if they are properly passed to the Web Block.

Check as well if you are using the correctly referencing the values of the Input parameters or there might some aggregate in the preparation of the web block or local variables in it that you have accidentally used in lieu of such.

Thank you and kind regards,

Chris

Rank: #4761
Solution

Hi all, I figured it out in the end. As I was using as list, I need to refresh the list widget to update new values I was entering.

Thanks for your help!

Asha