Iframe usage with web blocks

I have a web block that contains a data grid  (the forge component).   My data grid is driven by a filter section that allows users to select different filters which get fed into the Data Grid web block/ REST API.   It works great the first time, but if a user changes the filters and searches again the DG is blank.

Reading through the Data Grid support it appears this bug has been in the backlog since May, but one user mentions that if they wrap the Data Grid in an Iframe they can refresh that each time a new query is needed and it will refresh as needed.   I've never used Iframes and I'm not entirely sure how to wrap a web block in an Iframe.   Is there a simple way to do this?

Hi Josh,

Related to one of your questions, how to use an Iframe: 

In OutSystems there is an Iframe widget in OutSystemsUIWeb module, just reference it and use it on your screen.

More info on Iframe: https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Patterns/Using_Web_Patterns/Utilities/Iframe


Not knowing the post you are refering to, the webblock cannot be wrapped in an Iframe, but you can open any OutSystems screen by passing the URL to the SourceURL property of the Iframe widget. 

Regards,

Daniel


Thank you, I’ve been looking at the Iframe documentation.   What I’m struggling with is dynamically determining the URL.   In Dev the URL will be different than Test/Prod.    I assume there is some way to get the current page path and then just swap out the target page name in the SourceURL?

Solution

Hi,

Yes this is possible, you can use the following from HTTPRequestHandler module:

You can use GetEntryUrl() or MakeAbsoluteUrl() in combination with GetEntryEspaceName()

In below example of using GetEntryURL() you could instead of coding espaceName use GetEntryEspaceName() to get the espacname dynamically asuming the screen is in the same module as this action, else you need to code it.



Regards,

Daniel

Solution

Daniël Kuhlmann wrote:

Hi,

Yes this is possible, you can use the following from HTTPRequestHandler module:

You can use GetEntryUrl() or MakeAbsoluteUrl() in combination with GetEntryEspaceName()

In below example of using GetEntryURL() you could instead of coding espaceName use GetEntryEspaceName() to get the espacname dynamically asuming the screen is in the same module as this action, else you need to code it.



Regards,

Daniel


Thank you, this is perfect!