Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6958505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:08:54+00:00 2026-05-27T15:08:54+00:00

I’m currently creating an application using Play!, and i wanted to update my view

  • 0

I’m currently creating an application using Play!, and i wanted to update my view according to values from my database.

I have created a monitoring job which purpose is to send http request to severals sites every 30 minutes and to record a value into database for each site : if the site has responded, it records 1, otherwise it records 0.

Beside of that, i wanted to view on my application main template little color dots for each site : if the site is responding, it will be green, and if not, it will be red. This color update must be done asynchronously. This dots will be displayed for every pages of my application.

So, i can use my job, which is already an asynchronous thing, to change dots colors when it’s necessary, but i don’t know if it’s possible to update views from a job.
Or i can create an ajax script to update colors using css but i don’t know how to trigger it when my database flags values changes.

Thanks for your help !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:08:55+00:00Added an answer on May 27, 2026 at 3:08 pm

    You can’t update views from a job. But you could update it with a WebSocket: http://www.playframework.org/documentation/1.2.4/asynchronous#UsingWebSockets
    But it’s not supported on all browsers yet.

    I think the standard way to do this is to call a controller (which ask your db) from ajax every X seconds and update the dots colors depending on the response. Be careful in choosing your refresh rate, if you have a lot of client, you server will have a lot of requests.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently running into a problem where an element is coming back from
I want use html5's new tag to play a wav file (currently only supported
I have a text area in my form which accepts all possible characters from
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
I have thousands of HTML files to process using Groovy/Java and I need to
I have a reasonable size flat file database of text documents mostly saved in
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a bunch of posts stored in text files formatted in yaml/textile (from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.