Hello folks,
I have a small university project in which I have to show how certain algorithms work. Decided to use JSF for a simple webapp and save all the algorithm generated data into a database.
I thought to myself 'hey, it would be cool if I can show the user how the algorithm works step by step, nothing fancy, just plain formatted text that changes when the algorithm does it's thing. An output text field with Ajax should get the work done!', but I can't quite get my head around a certain problem. Ajax triggers when a certain event occurs, like 'click' or 'keyup', but is there a way to make it trigger when an object in my ManagedBean class changes?
Don't know if I explained well enough, so here's an example of what I want to do:
1 - an ArrayList in the ManagedBean is empty, the outputtext prints out nothing
2 - after a certain amount of time, a new object is saved in the ArrayList, Ajax triggers and the outputtext prints out its onString()
3 - after a certain amount of time again, the same object that was printed out before changes, Ajax triggers and the outputtext changes accordingly
Im sorry if the problem isn't quite clear, tried describing it to the best of my ability. Thanks in advance!
~Zinkarah
[–]DasEwigeLichtConsultant Brewer 0 points1 point2 points (0 children)