Dynamically and in real time update web page contents - java

I need to create a screen that is automatically updated every minute or so with fresh data from a server-based data source, perhaps a simple text file or XML - and is displayed as a web page.
The screen will show a list of items that can be marked with a red, yellow or green icon, as to indicate their status. Each item has a drop-down where you can select/change the current status. So, when a user changes the status for one of the items, every screen monitoring this web page will be automatically updated.
I'm a pretty novice web programmer (I only have experience with desktop programming, VB and a little C#), so I'm really just hoping for a quick push in the right direction here. I assume that this really isn't all that difficult to implement. Am I wrong? And where can I find more info on how to do this? :-)
I really appreciate any help I can get. Thanks in advance!

This sounds like a solution with Websockets. You don't need update every minute. You're able to update every times when a user make changes. Client Side in Java Script is very easily to implement Websockets. Tutorial can be found here.
Server side you need a Websocket Server. What you need depends on which programm language you use.

Related

How Do I Make Android WebView Load Page Modal Elements?

I'm trying to make a really simple app for a friend to display his bar's ordering website in an app for when they reopen with the social distancing measures in place. The web app already exists, so this is really a simple matter of displaying the content in a WebView.
I've got the page loading, the content is visible, the styling is done - The only problem is that it doesn't seem to be loading all the elements. There's a line of filters at the top which just display as 3 dots (i.e. loading), and when I click any of the items on the menu, nothing happens. There should be a window pops up asking for a table number etc... If I open this in the Chrome browser on my phone, rather than a webview in the app it works perfectly so I know it isn't the website.
I've done the following;
setJavaScriptEnabled(true);
setJavaScriptCanOpenWindowsAutomatically(true);
setSupportMultipleWindows(true);
I've also turned off safe browsing in the manifest in case that was blocking anything. I have also given the app permissions to use the internet. I can't figure this one out at all and nothing online seems to be helping!
Admittedly I'm a tester (automated, but still), so coding isn't my best suit. I may be missing something really simple here. Any ideas?
Scratch that. For anyone who's interested, I needed to add this line;
setDomStorageEnabled(true);
For such a simple thing it proved impossible to find info on, I just enabled everything until something worked! So hopefully you don't have to do the same if you're looking at this.

Posting/clicking buttons java

i have some basic knowledge of java (made little programs to help everyday life) Now the thing is i want to make a program that posts offers on a site every 2-3 minutes. I have never done anything with java related to the internet and web pages and even after browsing the internet i am clueless. How would i go about setting up a connection to a certain page click a certain button on that page and then fill in 3 boxes with information and post the offer?
Here is what i have to click:
Here is the form i have to fill in:
You have to learn a bit more about how HTML form works, but basically browser sends a POST request to the webserver with the values from the form.
Chrome's Developer Tools, Firefox's web developer toolbar has a functionality what can help you to discover what request is sent to the server when you post a single form. Of course you have to fill the values with your heart content
If you already know what content you want to send, you can post it relative easily, it is described well with examples in this StackOverflow answer https://stackoverflow.com/a/4206094/182474.
But I strongly recommend to discover how browsers works internally from the aspect of HTTP protocol, because it is a very useful knowledge if you want to develop tools that interacts with web APIs or simulate posting HTML forms.
You could use java.awt.Robot class and make all this thinks =)
you only need to write your manually action to the automated action =)
move mouse on text
write this...
tab
write this other..
tab press enter
wait N second
hope it helps! =)

Java Eclipse Google App Engine Tutorial for Google Wallet

I preface this with the fact I am a Java newbie. If one has a working web app in Java using Google App Engine, and one is looking for a simple tutorial for how to add Google Wallet to accomplish a pay-per-use requirement of that web site, does anyone have a reference for a very easy to understand tutorial, book, sample, etc.? What Google provides seems to be a jumble.
If it matters, here is a basic outline of what my web app currently does: User enters a little bit of basic data, chooses from some options, hits "submit", and a whole bunch of calculations happen, with a printout of the result. I would like a tutorial or any direction on how to have Google Wallet popup at the point of "submit" and the calculations happen when that process is complete. Nothing fancy.
Thank you in advance. ANY direction is appreciated. I do not need my hand held (although I won't refuse that), just need a good place to visit to get those hands dirty without slamming my head on the desk in utter confusion.
You probably want the Google Wallet for digital goods API.
https://developers.google.com/commerce/wallet/digital/docs/tutorial
On submit you initiate the purchase flow. Then on the success callback you do whatever calculations you need.

Google Web Toolkit auto refresh grid

I implementing an application that has a grid in it and everytime someone changes something on this grid it automaticaly updates the grid for others who has the grid opened (something like what the google docs does).
I tried implementing this using gwt-rpc sending a request every 2 seconds and if there is something new the application just send what has changed. But I had some bad results when uploaded to the GAE server.
So I decided to analyze the google docs implementation and a saw that it keeps a open connection for almost one minute and send some new information everytime someones changes something. I would like to know if it's possible to do something like this on GWT. I'm trying to do it now using the request factory but I think I'll face the same problems.
Any ideas?
Since you use GAE you might want to look at Channel API.
There is also gwt-gae-channel, which is a GWT wrapper around Channel API's javascript client.
You might check out what the GWT folks gave to say about using push technology with GWT

Online Screen Capture/Recording

I would like to implement a screen recording function for the users of my website.
This will be for a penny auction style website so that the users can record their bids and provide proof if something goes wrong with the auctions.
Here is a demo of an online recorder. http://www.screentoaster.com/watch/demo/screentoaster
Does anyone know of any framework, script or third party that has these functions?
I would ultimately like to embed a record button into the auction and it would automatically start recording a predefined area.
I know this does not directly answer your question, but if I were approaching the issue of proof of purchase I would create a simple server side script for sending a confirmation email/invoice because they can be relied upon in a court of law (ISPs can prove they were sent).
The issue with the screen grabbing approach is that someone could say open developer tools in chrome, edit your webpage to look like he or she has placed a bid before pressing the screen record button.
Hope this helps!
I've had good luck with: screenr.com

Categories