-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ajax driven site #175
Comments
Hi there, I think I must disappoint you: With my own experience with Websockets, I do not think that the current bundle can be used with the setup you have in mind. Or at least, not without significantly rewriting the templates. This is mostly because of the Twig template oriented style: everything is rendering in a twig template. You would at least need to redefine all (or add more) controllers to enable JSON data export. And you would need to write your own JS logic on the page to refresh all data, and then I am not yet considering adding new rows. There is already an issue about AJAX capabilities, see #59. However, AJAX and websockets are two completely different things, so you should consider both I guess. |
Allow me to disagree as I got it to work. Since every request return something with a base template (I use the one provided by the bundle), I wrapped everything that I don't want to be reloaded in the base_uncompressed.html.twig file with I still haven't finished turning the forms into ajax forms with the ajaxForm plugin, but for everything seems to be working except the collapse/expand filters button. All javascript files get loaded only once, including the one where I make the socket connection, as I wanted. Now I just need to solve the filter button problem. |
Well, I got this to work as I wanted, so you can close the issue if you wish. If anyone needs help with this, just contact me. |
I do not like the To clarify why I think it is not the best method: I will close this, as it is not an issue for the project. |
Hi.
I'm developing an app with s2a that needs to use websockets. Because of that, I want to avoid page reloads to keep from disconnecting and connecting the socket (done in js) for every page visited.
So I am thinking of "ajaxifying" the app, but I'm not being able to do that.
Can you point me at the easiest way to do this? Or any other approach that I'm not seeing?
The text was updated successfully, but these errors were encountered: