Open Closed

How to change a widget data or view data from an entity change in single-layered application #6089


User avatar
0
Vipinthachinari created

Is it possible to refresh or update the data of a widget from the server side using an event bus or any other feature? In other words, can we change the widget's data when there is a change in the server-side entity? or can we consume a local event published from server side and consume from client side?


7 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello Vipinthachinari,

    please check https://docs.abp.io/en/abp/latest/UI/AspNetCore/Widgets#refreshurl

    regards,

  • User Avatar
    0
    Vipinthachinari created

    https://docs.abp.io/en/abp/latest/UI/AspNetCore/Widgets#refreshurl

    Hi Anjali, Actually my requirement is, Whenever an API call occurs (or an entity change), I need to update the data of a widget accordingly. Is it possible with this?

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hi Vipinthachinari,

    You can achieve the requirement of updating the data of a widget whenever an API call occurs (or an entity change), by using the built-in event bus mechanism. You may refer this https://docs.abp.io/en/abp/latest/Local-Event-Bus for event-bus implementation

    regards, Anjali

  • User Avatar
    0
    Vipinthachinari created

    Hi Vipinthachinari,

    You can achieve the requirement of updating the data of a widget whenever an API call occurs (or an entity change), by using the built-in event bus mechanism. You may refer this https://docs.abp.io/en/abp/latest/Local-Event-Bus for event-bus implementation

    regards, Anjali

    Hi Anjali, I have developed an application with a local event bus to handle entity change events on the server side. Now, I'm looking to understand how to subscribe to and consume these events from the client side.Or whether it's possible to use these events to trigger a refresh URL or update widget data?

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hi,

    please check this https://docs.abp.io/en/abp/2.5/Customizing-Application-Modules-Extending-Entities#subscribing-to-local-events if found helpful. Also have look to this https://volosoft.com/blog/RealTime-Messaging-Distributed-Architecture-Abp-SingalR-RabbitMQ

    regards,

  • User Avatar
    0
    Vipinthachinari created

    Hi,

    please check this https://docs.abp.io/en/abp/2.5/Customizing-Application-Modules-Extending-Entities#subscribing-to-local-events if found helpful. Also have look to this https://volosoft.com/blog/RealTime-Messaging-Distributed-Architecture-Abp-SingalR-RabbitMQ

    regards,

    Hi, Using SignalR, I can send messages from a client to client ,but not Server to client. How can we send from Server to Client ? Is it needed a connection from server side? Is there any sample code to sent message from server to client?

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hi

    yes signlar can be used to send message from server to client

    https://github.com/abpframework/abp-samples/tree/master/SignalRDemo https://docs.abp.io/en/abp/latest/SignalR-Integration here is the demo sample

Made with ❤️ on ABP v9.1.0-preview. Updated on December 10, 2024, 06:38