test answer :)
daniel ccss schrieb:
Hi Paul!!!!

Thanks for your answers, yes actually when I implemented your filter the call to the DB reduce to 2 :), and then Vladimir says that with the backing_bean in session all works fine, and yes, all works fine :), the only problem is that when I implemented the add, delete, and the edit actions the data in the data scroller is not update until I click on any page link of the table (1,2,3). I think that this happen because of the filter (if) that you did (great) so what I need now is a way to do the fetch no matter what after and add/delete/edit action is made. So I was thinking in add another condition to the if(.... || (doNomatherWhat) ...doFech). What I dont know is where define this variable, and where to assign it the value to true after the add/delete/edit method was called. Can you help me on this?

I think Vladimir write ideas about this I'm going to read then, and I will wait for yours too thank you and thanks Vladimir!!!

On 7/5/07, *Paul Iov * <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hi Vladimir and Daniel,

    just read my post in parallel subthread ;)

    regards,
    paul
    Vladimir Isakovich schrieb:
    > 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]
    <mailto:[EMAIL PROTECTED]>
    > <mailto: [EMAIL PROTECTED] <mailto:[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