[Cubicweb] Controller and message display without reloading

St├ęphane Bugat stephane.bugat at free.fr
Fri Aug 31 13:45:38 CEST 2012


Dear CW users,

Following a discussion we had auc & I on #public, here is a synthesis of my issue:

I have developed a table view to display a list of contacts, and I added a search field to look for other contacts still not connected (by firstname, surname, and so on). For that, I have chosen to define a form with a single string widget and put a "form.render(...)" in the call method of the view.

I added a controller to the form, of course. In some cases, if the rset resulting from the query using the search field is not empty, I redirect to another view with this controller. But if the rset is empty, I want my controller to stay on the same view but display a message in the notification bar, something like 'No results were found sorry'.

And, the final point: I want this *without having to reload the whole view* (which can be a bit long depending on the query to get all contacts).

How can I proceed?

Stephane



More information about the Cubicweb mailing list