Em Tue, 05 Aug 2008 10:58:45 -0300, daniel alonso <[EMAIL PROTECTED]> escreveu:

Due to some requirements, pages must be accessible and no javascript is
allow for me, so, at first glance, no ajax can be used at my pages.

The J in AJAX is Javascript, so you cannot *rely* on Javascript, but you use it, as long as your pages still work with Javascript disabled. With Request.isXHR(), it's easy to do that.

As i have checked  in the books, there are a couple of ways: use @Persist
for the resultset, @Persist("flash") or passivate and activate. We want to avoid the first way, for session size. The second way works great, but the last one doesn't work (or at leas, we cannot make it works).

@Persist("flash") the form fields, not the resultset. ;)
Instead of doing the search in your action request, do that in the render request (don't forget that T5 uses redirect-after-post unless you explicitly turn it off, and you shouldn't):

@Persist("flash")
private String field1;

@Persist("flash")
private String field2;

public List<Result> getResults() {
return search(field1, field2); // where search is a method that does the search
}

<table t:type="Grid" t:source="results">
        ...
</table>

One fact that is ofter overlooked is that the form is submitted and page field's values set *even when you don't have a method listening* to the form events. ;)

I hope it helps. :)

Thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to