Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 8394 invoked from network); 6 Jul 2007 19:31:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Jul 2007 19:31:09 -0000 Received: (qmail 17640 invoked by uid 500); 6 Jul 2007 19:31:05 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 17604 invoked by uid 500); 6 Jul 2007 19:31:05 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 17593 invoked by uid 99); 6 Jul 2007 19:31:05 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jul 2007 12:31:05 -0700 X-ASF-Spam-Status: No, hits=2.3 required=10.0 tests=HTML_MESSAGE,MAILTO_TO_SPAM_ADDR,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of danielccss2@gmail.com designates 66.249.90.181 as permitted sender) Received: from [66.249.90.181] (HELO ik-out-1112.google.com) (66.249.90.181) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jul 2007 12:31:00 -0700 Received: by ik-out-1112.google.com with SMTP id c30so291864ika for ; Fri, 06 Jul 2007 12:30:38 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=CtCRb81umOeS4IzdLip38+OzirD3WqS3yKYZCoSWT97lLZ9s+iU+XTzLAYe15L1O7Q4o4T5qM+Is+0g5MXjeg5+bLERAbFKxIHU1DXz93dIT5dBSchHEyWfa3bG99axJY7OjCcYQD+i8SizC/NvbRFOurdCXK/TCalLg/4Vy+oA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=tzY+wLMvsrcStTZuphsNVYJMt+b3TgZCNvMXFj64nTISAq4U/Y5ZLJDMrnvlSDd1/b8GRkjtRXFt8JZesUJd5ec/DlPE0ph58jancZRFHtNFTK7HgZKo9cUL1IiInEr2iXu9q2IgvyltMTghhx4F8V8G4Df136vxlJmr41O9Lnc= Received: by 10.78.175.14 with SMTP id x14mr493232hue.1183750238478; Fri, 06 Jul 2007 12:30:38 -0700 (PDT) Received: by 10.78.107.13 with HTTP; Fri, 6 Jul 2007 12:30:38 -0700 (PDT) Message-ID: <2bd5ed640707061230p2b230667o794a8445a1ed0e3@mail.gmail.com> Date: Fri, 6 Jul 2007 13:30:38 -0600 From: "daniel ccss" To: "MyFaces Discussion" Subject: Re: Tomahawk+DataScroller+WorkingWithLargeTables In-Reply-To: <11470790.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_99767_3011204.1183750238406" References: <2bd5ed640707022042p432719a5l32a8e5b7399ea879@mail.gmail.com> <468B8D7F.2030808@voller-ernst.de> <2bd5ed640707041012w1dfa45aaibe79a2067afc5d77@mail.gmail.com> <468D0560.9090000@voller-ernst.de> <468DA4A3.9030502@voller-ernst.de> <2bd5ed640707060821x3e727d4bm227b2ed7ab3af712@mail.gmail.com> <468E6D71.4070105@voller-ernst.de> <11470790.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_99767_3011204.1183750238406 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Now I see your long answer, i=B4m going to read it, Vladimir you still have two calls to the DB, but you was the one who give me the tip of put the backing_bean on sesion to avoid that. I only have one call now. On 7/6/07, vlad10 wrote: > > > Paul, > I hope you did not miss my email from late yesterday with 6 items. > I just discovered something in addition to this discussion. I have a page > with a dataTable but no scroller, and I've noticed, that my method for > accessing DB was called twice right on start. That means the bug with dup > calls is hidden in dataTable rather than dataScroller. > > vlad > > > Paul Iov wrote: > > > > Hi Daniel, > > > > have you read my long post about how the data are handled in internal > > storage? Do you have the same approach and what do you mean exactly wit= h > > "delete"? If you just delete the record from DB (i.e. via JDBC/SQL), yo= u > > have to set also _invalidated flag in my class, to force the internal > > storage to be reloaded. (It's not especially efficient but it should > > work.) If you have implemented your own delete(_whatever_) method in > > this class, this method have to delete the ID from internal storage and > > then ensure, that the page will be refetched next time (i.e. with some > > extra boolean flag; in my code I just store the last ID-list generated > > during fetching of page and if it becomes changed [something was > > deleted/sorted in internal storage], I force the page to be refetched). > > This should be the better way, since after delete/edit of an item only > > the current page of data will be refetched - not the whole dataset AND > > the current page. ...and first after this comes the issue with > > dropScroller :). Probably, you don't need then this method at all. > > > > > > daniel ccss schrieb: > >> Hi Paul, I put your code in my backing_bean and call the method > >> dropScroller(String dataTableId) after the delete method was called, I > >> send to this method the id of the data table: > >> > >> >> > >> > >> But the dataTable doesn=B4t update, in my console I recived the messag= e: > >> " dropScroller called" but nothing happen. What else do I should do, > >> or what I'm doing bad. > >> > >> Also: > >> I guess Daniel, you are using event listener in your backing bean to > >> edit data directly in PagedList? It's the only way to have actual copy > >> displayed without to reload this page. > >> > >> Yes, Paul in fact I=B4m doing that, and, as Vladimir, I call the DB ea= ch > >> time the PageData change. When I didn=B4t have your improved class > >> PagedList, it works fine, since the fetch was doing many times for > >> each action and the data update in the DataTable. For that I was > >> thinking in some way put another condition on your filter for the > >> fetch where after I called the add/delete/edit method put that > >> variable in true and enter to the if to do the fetch, because I see > >> that when I click in the page number (a fetch is doing) the data > >> update in the DataTable. I hope your solution works for me It looks > >> pretty nice. > >> > >> On 7/5/07, *Vladimir Isakovich* >> > wrote: > >> > >> Paul, > >> many thanks for your answers. > >> > >> 1. Interestigly enough, after the warning the border is still > >> applied. If I try to do the same with style=3D..., there is no > effect. > >> this has nothing to do with the data fetching. > >> 2. I have a guess about two calls to fetchPage() in the DataModel. > >> May be it's because we have 2 UIComponents called DataScroller > >> (one with buttons and another with the message). Shuld it be > >> posted as a bug on dataScroller? I've seen the defects page on > >> myFaces, but not familiar with the procedure of addin to that list= . > > >> 3. I've got it why you have your pageSize being analized and used > >> in getDataModel(), your page explains it. I'll try to implement > >> the same with an additional inputText. > >> 4. I also noticed on your page - the dataScroller has just 2 > >> buttons plus numbers in between. This way your strategy of > >> fetching data chunks should work. I am using the "standard" > >> scroller which has in addition fast forward/backward and > >> first/last buttons, and in this case I think I'm better of calling > >> DB every time (I've no way of predicting what page will be > >> requested next). > >> 5. Probably next thing I'll try to implement: edit/delete/add, and > >> after that I'm planning to implement Ajax datascroller. It's not a > >> good user experiense, when the whole page gets re-rendered on > >> every action. > >> 6. Although I've experience with javaScript, at least when I > >> compare myself with the java developers I've worked with, but I've > >> never tried using XmlHttpRequest. I have this book: 'Pro JSF and > >> Ajax', but it was a diappointment after loading and gettin running > >> their example to find out that it's based on some proprietary > >> jars. Since you're using this ajax dataScroller, could you please > >> enlight me on any existing standard for ajax (are there some > >> 'standard' jars I can use as a base of my app)? > >> > >> thanks, vlad > >> > >> > >> On 7/5/07, *Paul Iov* < paul@voller-ernst.de > >> > wrote: > >> > >> Well... just a bit refining > >> Vladimir Isakovich schrieb: > >>> > >>> Jul 5, 2007 1:12:09 PM com.sun.facelets.tag.jsf.ComponentRule > >>> warnAttr > >>> WARNING: /web/sec/examples/largeTableScroller.xhtml @104,85 > >>> border=3D"1" Property 'border' is not on type: > >>> org.apache.myfaces.component.html.ext .*HtmlGraphicImage* > >>> > >>> 2. I also can see a warning... > >>> > >> It's correct. The old good border=3D"0" for image is deprecate= d > >> with HTML4. We should use CSS instead. > >> > >> > >> > >> > > > > > > > > -- > View this message in context: http://www.nabble.com/Tomahawk%2BDataScroll= er%2BWorkingWithLargeTables-tf4016097.html#a11470790 > > Sent from the MyFaces - Users mailing list archive at Nabble.com. > > ------=_Part_99767_3011204.1183750238406 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Now I see your long answer, i=B4m going to read it, Vladimir you still have= two calls to the DB, but you was the one who give me the tip of put the ba= cking_bean on sesion to avoid that. I only have one call now.


On 7/6/07, v= lad10 <ivlad10@yahoo.com>= ; wrote:

Paul,
I hope you did not miss my email from late yesterday with 6 it= ems.
I just discovered something in addition to this discussion. I have = a page
with a dataTable but no scroller, and I've noticed, that my m= ethod for
accessing DB was called twice right on start. That means the bug with d= up
calls is hidden in dataTable rather than dataScroller.

vlad

Paul Iov wrote:
>
> Hi Daniel,
>
> have yo= u read my long post about how the data are handled in internal
> storage? Do you have the same approach and what do you mean exactl= y with
> "delete"? If you just delete the record from DB (i= .e. via JDBC/SQL), you
> have to set also _invalidated flag in my cla= ss, to force the internal
> storage to be reloaded. (It's not especially efficient but it = should
> work.) If you have implemented your own delete(_whatever_) m= ethod in
> this class, this method have to delete the ID from interna= l storage and
> then ensure, that the page will be refetched next time (i.e. with = some
> extra boolean flag; in my code I just store the last ID-list g= enerated
> during fetching of page and if it becomes changed [somethi= ng was
> deleted/sorted in internal storage], I force the page to be refetc= hed).
> This should be the better way, since after delete/edit of an = item only
> the current page of data will be refetched - not the whol= e dataset AND
> the current page. ...and first after this comes the issue with
= > dropScroller :). Probably, you don't need then this method at all.=
>
>
> daniel ccss schrieb:
>> Hi Paul, I put yo= ur code in my backing_bean and call the method
>> dropScroller(String dataTableId) after the delete method was c= alled, I
>> send to this method the id of the data table:
>&= gt;
>>          =        <t:dataTable id=3D"data" = styleClass=3D"scrollerTable" ...
>>
>>
>> But the dataTable doesn=B4t update, in= my console I recived the message:
>> " dropScroller called&q= uot; but nothing happen. What else do I should do,
>> or what I= 9;m doing bad.
>>
>> Also:
>> I guess Daniel, you are using ev= ent listener in your backing bean to
>> edit data directly in Page= dList? It's the only way to have actual copy
>> displayed with= out to reload this page.
>>
>> Yes, Paul in fact I=B4m doing that, and, as Vladim= ir, I call the DB each
>> time the PageData change. When I didn=B4= t have your improved class
>> PagedList, it works fine, since the = fetch was doing many times for
>> each action and the data update in the DataTable. For that I w= as
>> thinking in some way put another condition on your filter fo= r the
>> fetch where after I called the add/delete/edit method put= that
>> variable in true and enter to the if to do the fetch, because = I see
>> that when I click in the page number (a fetch is doing) t= he data
>> update in the DataTable. I hope your solution works for= me It looks
>> pretty nice.
>>
>> On 7/5/07, *Vladimir Isak= ovich* <ivlad10@gmail.com
= >> <mailto: ivlad10@gmail.com >> wrote:
>>
>>     Paul,
&g= t;>     many thanks for your answers.
>>>>     1. Interestigly enough, after the warning= the border is  still
>>     applied= . If I try to do the same with style=3D..., there is no effect.
>>     this has nothing to do with the data f= etching.
>>     2. I have a guess about two ca= lls to fetchPage() in the DataModel.
>>     Ma= y be it's because we have 2 UIComponents called DataScroller
>>     (one with buttons and another with the= message). Shuld it be
>>     posted as a bug = on dataScroller? I've seen the defects page on
>>  &= nbsp;  myFaces, but not familiar with the procedure of addin to that l= ist.
>>     3. I've got it why you have your p= ageSize being analized and used
>>     in getD= ataModel(), your page explains it. I'll try to implement
>>&nb= sp;    the same with an additional inputText.
>>     4. I also noticed on your page - the d= ataScroller has just 2
>>     buttons plus num= bers in between. This way your strategy of
>>   &nb= sp; fetching data chunks should work. I am using the "standard"
>>     scroller which has in addition fast fo= rward/backward and
>>     first/last buttons, = and in this case I think I'm better of calling
>>  &= nbsp;  DB every time (I've no way of predicting what page will be
>>     requested next).
>> &nbs= p;   5. Probably next thing I'll try to implement: edit/delet= e/add, and
>>     after that I'm planning = to implement Ajax datascroller. It's not a
>>   = ;  good user experiense, when the whole page gets re-rendered on
>>     every action.
>>  &= nbsp;  6. Although I've experience with javaScript, at least when = I
>>     compare myself with the java develope= rs I've worked with, but I've
>>     n= ever tried using XmlHttpRequest. I have this book: 'Pro JSF and
>>     Ajax', but it was a diappointment = after loading and gettin running
>>     their = example to find out that it's based on some proprietary
>>&nbs= p;    jars. Since you're using this ajax dataScroller, c= ould you please
>>     enlight me on any existing standard fo= r ajax (are there some
>>     'standard= 9; jars I can use as a base of my app)?
>>
>>  =    thanks, vlad
>>
>>
>>  &n= bsp;  On 7/5/07, *Paul Iov* < paul@voller-ernst.de
>>= ;     <mailto: http://www.nabble.com/Tomahawk%2BDataScroller%2BWorkingWithLargeTables-tf40= 16097.html#a11470790
Sent from the MyFaces - Users mailing list archive at Nabble.com.


------=_Part_99767_3011204.1183750238406--