Daniel, I have not tried yet to perform actions like add/edit/delete from
the sroller.

So, my thoughts only:
since your bean is session scoped now, you may have your boolean as an
instance variable.
Actually, you need to call for re-populating page when editing and deleting,
and when adding on the last page, if it has a vacant line.
Also you will need to adjust your total counter on add/delete

You know, I'm still have some confusion about the current code. As I
understand, the custom tag is calling fetchPage() supplying it with the
pageSize, so why do I need to supply the pageSize when instantiating
DataModel.
I've tried to change the pageSize in my jsp only, and it got changed - I did
not see a problem. So, it seems the pageSize hardcoded in getDataModel() is
mute. I'm always afraid of those duplicate definitions - who knows what will
happen when you upgrade to a new version of tomahawk.

Another bothering issue. Why in Paul's catching method there is a check on
pageSize, is not it gonna be the same every time?

vlad


On 7/5/07, daniel ccss <[EMAIL PROTECTED]> wrote:

I think is for the filter:

            if ((_lastPage == null) || (_lastStartRow != startRow) ||
(_lastPageSize != pageSize)){
                    _log.debug("**Fetch: required -> fetching...");
                    obligar = false;
                    _lastPage = fetchPage(startRow, pageSize);
                    _lastStartRow = startRow;
                    _lastPageSize = pageSize;
            }else{
                    _log.debug("**Fetch: not required (already
fetched)!");
            }
            return _lastPage;



I need that when an action like add, delete or edit occurs always enter to
this if, what do you think is the best way to do this, add another condition
to the if, lets say a boolen condition? that after the method that do the
delete/add/edit action this boolen be set to true, if so where this boolean
variable have to be, and where it have to be set, i´m thinking in something
like this:

backing_bean
            call delete method
            set some variable to true
            call the fetch method
PagedListDataModel
            add code to the if: if(..... || valiable=true)
           put the variable again in false

What I don´t have clear is where the boolean variable have to be define,
and where to set his value.




Reply via email to