You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by ej595 <ki...@yahoo.co.uk> on 2009/03/21 17:25:36 UTC

GRIDVIEW refresh -- yes or no.

Been spending some time with the Gridview repeater. Im using it for the cols
and rows feature, and all seems great. However, it seems the dataprovider is
only called once. If you have an ajax checkbox for example in your grid, and
as a result of a click you want to update the ENTIRE item list, the i seems
thats not permitted unless you reload the page.

is this part of the gridview operation, or should i be looking at another
repeater (which has the row, cols feature)


-- 
View this message in context: http://www.nabble.com/GRIDVIEW-refresh----yes-or-no.-tp22637779p22637779.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: GRIDVIEW refresh -- yes or no.

Posted by Igor Vaynberg <ig...@gmail.com>.
if that is the case you can create a quickstart and attach it to a jira issue.

-igor

On Sat, Mar 21, 2009 at 12:39 PM, ej595 <ki...@yahoo.co.uk> wrote:
>
> Yes i tried that also to see what the situation is. Iterator is only called
> once. Unless the entire page is re-loaded. I could be missing something
> simple.
>
> What ive done now is in the onUpdate(AjaxRequestTarget target) ive called
> getItems(); and i maniplate the items in the list manually. If call clear()
> on the list to see if somehow magically the iterator method will gets called
> again, it simply clears the list and never re-loads it (until i reload the
> entire page).
>
>
>
>
> igor.vaynberg wrote:
>>
>> set a breakpoint in idataprovider and see if size/iterator() are
>> called inside the ajax call. they should be.
>>
>> -igor
>>
>> On Sat, Mar 21, 2009 at 10:49 AM, ej595 <ki...@yahoo.co.uk> wrote:
>>>
>>> Yes , for sure it definately repaints it, but it seems that it repaints
>>> with
>>> the same contents or updated contents of the Items loaded from the inital
>>> dataprovider call ( iterator(int first, int count) ). If for example i
>>> want
>>> to refresh that list with a NEW database call, or rebuild the list - then
>>> it
>>> doesnt seem to do that.
>>>
>>> If for example, i have an ordered list of items in the grid that is
>>> determined by the model object (say, a property called position ), if i
>>> update the postion field i would expect that i could write the new
>>> position
>>> to the DB, reload the items with the same query (that was ordered by
>>> postion) and then refresh the grid with everything moving into the
>>> correct
>>> position. That doesnt seem to happen. The values get updated, but it
>>> doesnt
>>> populate the grid with the NEW data from the db call.
>>>
>>>
>>>
>>> igor.vaynberg wrote:
>>>>
>>>> webmarkupcontainer container=new webmarkupcontainer();
>>>> container.setoutputmarkupid(true);
>>>> container.add(new mygridview());
>>>>
>>>> ...add(new ajaxlink() { onclick(target) { target.add(container); }});
>>>>
>>>> will repaint the entire gridview via ajax.
>>>>
>>>> -igor
>>>>
>>>> On Sat, Mar 21, 2009 at 9:25 AM, ej595 <ki...@yahoo.co.uk> wrote:
>>>>>
>>>>> Been spending some time with the Gridview repeater. Im using it for the
>>>>> cols
>>>>> and rows feature, and all seems great. However, it seems the
>>>>> dataprovider
>>>>> is
>>>>> only called once. If you have an ajax checkbox for example in your
>>>>> grid,
>>>>> and
>>>>> as a result of a click you want to update the ENTIRE item list, the i
>>>>> seems
>>>>> thats not permitted unless you reload the page.
>>>>>
>>>>> is this part of the gridview operation, or should i be looking at
>>>>> another
>>>>> repeater (which has the row, cols feature)
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/GRIDVIEW-refresh----yes-or-no.-tp22637779p22637779.html
>>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/GRIDVIEW-refresh----yes-or-no.-tp22637779p22638572.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/GRIDVIEW-refresh----yes-or-no.-tp22637779p22639567.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: GRIDVIEW refresh -- yes or no.

Posted by ej595 <ki...@yahoo.co.uk>.
Yes i tried that also to see what the situation is. Iterator is only called
once. Unless the entire page is re-loaded. I could be missing something
simple.

What ive done now is in the onUpdate(AjaxRequestTarget target) ive called
getItems(); and i maniplate the items in the list manually. If call clear()
on the list to see if somehow magically the iterator method will gets called
again, it simply clears the list and never re-loads it (until i reload the
entire page).




igor.vaynberg wrote:
> 
> set a breakpoint in idataprovider and see if size/iterator() are
> called inside the ajax call. they should be.
> 
> -igor
> 
> On Sat, Mar 21, 2009 at 10:49 AM, ej595 <ki...@yahoo.co.uk> wrote:
>>
>> Yes , for sure it definately repaints it, but it seems that it repaints
>> with
>> the same contents or updated contents of the Items loaded from the inital
>> dataprovider call ( iterator(int first, int count) ). If for example i
>> want
>> to refresh that list with a NEW database call, or rebuild the list - then
>> it
>> doesnt seem to do that.
>>
>> If for example, i have an ordered list of items in the grid that is
>> determined by the model object (say, a property called position ), if i
>> update the postion field i would expect that i could write the new
>> position
>> to the DB, reload the items with the same query (that was ordered by
>> postion) and then refresh the grid with everything moving into the
>> correct
>> position. That doesnt seem to happen. The values get updated, but it
>> doesnt
>> populate the grid with the NEW data from the db call.
>>
>>
>>
>> igor.vaynberg wrote:
>>>
>>> webmarkupcontainer container=new webmarkupcontainer();
>>> container.setoutputmarkupid(true);
>>> container.add(new mygridview());
>>>
>>> ...add(new ajaxlink() { onclick(target) { target.add(container); }});
>>>
>>> will repaint the entire gridview via ajax.
>>>
>>> -igor
>>>
>>> On Sat, Mar 21, 2009 at 9:25 AM, ej595 <ki...@yahoo.co.uk> wrote:
>>>>
>>>> Been spending some time with the Gridview repeater. Im using it for the
>>>> cols
>>>> and rows feature, and all seems great. However, it seems the
>>>> dataprovider
>>>> is
>>>> only called once. If you have an ajax checkbox for example in your
>>>> grid,
>>>> and
>>>> as a result of a click you want to update the ENTIRE item list, the i
>>>> seems
>>>> thats not permitted unless you reload the page.
>>>>
>>>> is this part of the gridview operation, or should i be looking at
>>>> another
>>>> repeater (which has the row, cols feature)
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/GRIDVIEW-refresh----yes-or-no.-tp22637779p22637779.html
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/GRIDVIEW-refresh----yes-or-no.-tp22637779p22638572.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/GRIDVIEW-refresh----yes-or-no.-tp22637779p22639567.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: GRIDVIEW refresh -- yes or no.

Posted by Igor Vaynberg <ig...@gmail.com>.
set a breakpoint in idataprovider and see if size/iterator() are
called inside the ajax call. they should be.

-igor

On Sat, Mar 21, 2009 at 10:49 AM, ej595 <ki...@yahoo.co.uk> wrote:
>
> Yes , for sure it definately repaints it, but it seems that it repaints with
> the same contents or updated contents of the Items loaded from the inital
> dataprovider call ( iterator(int first, int count) ). If for example i want
> to refresh that list with a NEW database call, or rebuild the list - then it
> doesnt seem to do that.
>
> If for example, i have an ordered list of items in the grid that is
> determined by the model object (say, a property called position ), if i
> update the postion field i would expect that i could write the new position
> to the DB, reload the items with the same query (that was ordered by
> postion) and then refresh the grid with everything moving into the correct
> position. That doesnt seem to happen. The values get updated, but it doesnt
> populate the grid with the NEW data from the db call.
>
>
>
> igor.vaynberg wrote:
>>
>> webmarkupcontainer container=new webmarkupcontainer();
>> container.setoutputmarkupid(true);
>> container.add(new mygridview());
>>
>> ...add(new ajaxlink() { onclick(target) { target.add(container); }});
>>
>> will repaint the entire gridview via ajax.
>>
>> -igor
>>
>> On Sat, Mar 21, 2009 at 9:25 AM, ej595 <ki...@yahoo.co.uk> wrote:
>>>
>>> Been spending some time with the Gridview repeater. Im using it for the
>>> cols
>>> and rows feature, and all seems great. However, it seems the dataprovider
>>> is
>>> only called once. If you have an ajax checkbox for example in your grid,
>>> and
>>> as a result of a click you want to update the ENTIRE item list, the i
>>> seems
>>> thats not permitted unless you reload the page.
>>>
>>> is this part of the gridview operation, or should i be looking at another
>>> repeater (which has the row, cols feature)
>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/GRIDVIEW-refresh----yes-or-no.-tp22637779p22637779.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/GRIDVIEW-refresh----yes-or-no.-tp22637779p22638572.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: GRIDVIEW refresh -- yes or no.

Posted by ej595 <ki...@yahoo.co.uk>.
Yes , for sure it definately repaints it, but it seems that it repaints with
the same contents or updated contents of the Items loaded from the inital
dataprovider call ( iterator(int first, int count) ). If for example i want
to refresh that list with a NEW database call, or rebuild the list - then it
doesnt seem to do that.

If for example, i have an ordered list of items in the grid that is
determined by the model object (say, a property called position ), if i
update the postion field i would expect that i could write the new position
to the DB, reload the items with the same query (that was ordered by
postion) and then refresh the grid with everything moving into the correct
position. That doesnt seem to happen. The values get updated, but it doesnt
populate the grid with the NEW data from the db call. 



igor.vaynberg wrote:
> 
> webmarkupcontainer container=new webmarkupcontainer();
> container.setoutputmarkupid(true);
> container.add(new mygridview());
> 
> ...add(new ajaxlink() { onclick(target) { target.add(container); }});
> 
> will repaint the entire gridview via ajax.
> 
> -igor
> 
> On Sat, Mar 21, 2009 at 9:25 AM, ej595 <ki...@yahoo.co.uk> wrote:
>>
>> Been spending some time with the Gridview repeater. Im using it for the
>> cols
>> and rows feature, and all seems great. However, it seems the dataprovider
>> is
>> only called once. If you have an ajax checkbox for example in your grid,
>> and
>> as a result of a click you want to update the ENTIRE item list, the i
>> seems
>> thats not permitted unless you reload the page.
>>
>> is this part of the gridview operation, or should i be looking at another
>> repeater (which has the row, cols feature)
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/GRIDVIEW-refresh----yes-or-no.-tp22637779p22637779.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/GRIDVIEW-refresh----yes-or-no.-tp22637779p22638572.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: GRIDVIEW refresh -- yes or no.

Posted by Igor Vaynberg <ig...@gmail.com>.
webmarkupcontainer container=new webmarkupcontainer();
container.setoutputmarkupid(true);
container.add(new mygridview());

...add(new ajaxlink() { onclick(target) { target.add(container); }});

will repaint the entire gridview via ajax.

-igor

On Sat, Mar 21, 2009 at 9:25 AM, ej595 <ki...@yahoo.co.uk> wrote:
>
> Been spending some time with the Gridview repeater. Im using it for the cols
> and rows feature, and all seems great. However, it seems the dataprovider is
> only called once. If you have an ajax checkbox for example in your grid, and
> as a result of a click you want to update the ENTIRE item list, the i seems
> thats not permitted unless you reload the page.
>
> is this part of the gridview operation, or should i be looking at another
> repeater (which has the row, cols feature)
>
>
> --
> View this message in context: http://www.nabble.com/GRIDVIEW-refresh----yes-or-no.-tp22637779p22637779.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org