Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
António Barroso
45
Views
4
Comments
Ajax Refresh
Question
Hi all
Ajax refresh allows to refresh an element by id in design time. Is it possible to ajax refresh an element defined in an expression?
the ideia is to "ajax refresh" a container that is only known in runtime (by its client id) depending on a event message.
Thanks
Antonio Barroso
Leonardo Fernandes
MVP
Hi António.
Depending on your scenario, you might try creating a web block for that, let's call it
RefreshableContent
. This web block would contain a single placeholder and a hidden ajax button. Clicking in the hidden button (via JavaScript) would refresh the placeholder.
Now you can use the RefreshableContent on your screens: whenever you want some content that may be refreshed, just place it inside the placeholder of this web block. On the client side, you still need to find the correct hidden button in JavaScript (maybe adding a special class to it would help), and send it a click event.
1 reply
01 Sep 2015
Show thread
Hide thread
António Barroso
Leonardo Fernandes
wrote:
Hi António.
Depending on your scenario, you might try creating a web block for that, let's call it
RefreshableContent
. This web block would contain a single placeholder and a hidden ajax button. Clicking in the hidden button (via JavaScript) would refresh the placeholder.
Now you can use the RefreshableContent on your screens: whenever you want some content that may be refreshed, just place it inside the placeholder of this web block. On the client side, you still need to find the correct hidden button in JavaScript (maybe adding a special class to it would help), and send it a click event.
Thank you Leonardo
It seems to be a good way to resolve my problem
best regards
Kilian Hekhuis
MVP
In general though, it would be nice to be able to refresh an element by its Id. Perhaps I'll create an Idea for that, as I've needed it in the past.
Kilian Hekhuis
MVP
I created an idea:
https://www.outsystems.com/ideas/2146/ajax-refresh-by-widget-id
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...