Re: How to delete an item from List view.

2010-03-17 Thread prati
Hi I have got a refreshingView with a delete link in each row and only one AddLink,AddLink adds the row properly but deleteRow everytime deletes the last row,its driving me crazy,I have posted my code also.I will apprecaite if any one can help me in this. Honestly its not that easy the way

Re: How to delete an item from List view.

2010-03-17 Thread prati
Hi Team, Also i dont want to remove values , i want to remove the entire row. My row contains(TextBox and option group) Thanks Prati prati wrote: Hi I have got a refreshingView with a delete link in each row and only one AddLink,AddLink adds the row properly but deleteRow

Re: How to delete an item from List view.

2010-03-17 Thread Major Péter
Hi, Been there, pal, believe me, been there. :)) See https://issues.apache.org/jira/browse/WICKET-2432 quickstart.zip Remove the FileUpload and this should do it for you. :) Best Regards, Peter 2010-03-17 15:10 keltezéssel, prati írta: Hi I have got a refreshingView with a delete link in

Re: How to delete an item from List view.

2010-03-17 Thread prati
Hi ListView/Refreshing View any willd o but dont know how to solve this. Thanks P prati wrote: Hi Team, Also i dont want to remove values , i want to remove the entire row. My row contains(TextBox and option group) Thanks Prati prati wrote: Hi I have got a

Re: How to delete an item from List view.

2010-03-15 Thread prati
Hi, I am also having similar issue, it all the time removes last row. I have attached code. OptionGroupPageForm(String id) { super(id); final MarkupContainer rowPanel = new WebMarkupContainer(rowPanel);

Re: How to delete an item from List view.

2008-02-04 Thread Johan Compagner
You do use a delete button, so i guess the values are submitted. Then if you store those first in the model objects you won't loose anything johan On Feb 4, 2008 2:35 PM, pnerkar [EMAIL PROTECTED] wrote: Hi Johan, Yes that will be quickest solution , But this will clear the fields of all

Re: How to delete an item from List view.

2008-02-04 Thread Eelco Hillenius
On Feb 4, 2008 3:45 AM, Martijn Dashorst [EMAIL PROTECTED] wrote: On 2/3/08, Eelco Hillenius [EMAIL PROTECTED] wrote: How about a reconsideration of depreciating ListView? -1 If anytime someone comes along with a misunderstanding of a valid component we don't have a framework left: -

Re: How to delete an item from List view.

2008-02-04 Thread Johan Compagner
wasn't the quickest solution: public void onSubmit() { List vehicles = (List) getParent().getParent().getModelObject(); vehicles.remove(index); listView.removeAll(); } Then if the list itself is stable on the server side (if other persons can also delete or add stuff to that

Re: How to delete an item from List view.

2008-02-04 Thread Martijn Dashorst
On 2/3/08, Eelco Hillenius [EMAIL PROTECTED] wrote: How about a reconsideration of depreciating ListView? -1 If anytime someone comes along with a misunderstanding of a valid component we don't have a framework left: - models - drop down choice - urls - mounting All those things can be

Re: How to delete an item from List view.

2008-02-04 Thread pnerkar
Hi Johan, Yes that will be quickest solution , But this will clear the fields of all vehicles. -Pnerkar Johan Compagner wrote: wasn't the quickest solution: public void onSubmit() { List vehicles = (List) getParent().getParent().getModelObject(); vehicles.remove(index);

Re: How to delete an item from List view.

2008-02-04 Thread Igor Vaynberg
you lose values that werent validated if you do that, because those are stored in components themselves... -igor On Feb 4, 2008 6:15 AM, Johan Compagner [EMAIL PROTECTED] wrote: You do use a delete button, so i guess the values are submitted. Then if you store those first in the model objects

Re: How to delete an item from List view.

2008-02-04 Thread Nino Saturnino Martinez Vazquez Wael
I've come to love listview, and use it all the time. Would be sad to see it go away.. Sure there are somethinges you need to be aware of when working with it but thats just life... -1 Eelco Hillenius wrote: On Feb 4, 2008 3:45 AM, Martijn Dashorst [EMAIL PROTECTED] wrote: On 2/3/08,

Re: How to delete an item from List view.

2008-02-02 Thread Alan Romaniuc
Hi all, I know that will be sound a little stupid, but ListView causes a lot of problems for newbies (including reuse startegy). Maybe a better or more in depth wiki entry would avoid these questions on this mail list? Just a suggestion (once i am facing the same probles, i would not be the

Re: How to delete an item from List view.

2008-02-02 Thread Igor Vaynberg
well, thats the problem. you say you are not the right person because you dont know. and that is the excuse a lot of users give for not writing the wiki page. but guess what, after we help them here and they do understand how listview works - they still dont come back and write the wiki page. so

Re: How to delete an item from List view.

2008-02-02 Thread Eelco Hillenius
On Feb 2, 2008 2:19 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: well, thats the problem. you say you are not the right person because you dont know. and that is the excuse a lot of users give for not writing the wiki page. but guess what, after we help them here and they do understand how

Re: How to delete an item from List view.

2008-02-02 Thread Igor Vaynberg
i dont think i was harsh. i simply stated that the excuse i dont yet know enough is not really an excuse but a cop out, because most users dont come back and contribute something. im not angry about it, but it is a fact. -igor On Feb 2, 2008 9:05 PM, Eelco Hillenius [EMAIL PROTECTED] wrote: On

Re: How to delete an item from List view.

2008-02-01 Thread pnerkar
Hi Eelco, RefreshingView is available in wicket 1.3.0. While I'm using wicket 1.2.6. Regards, Pankaj,... Eelco Hillenius wrote: On Jan 31, 2008 3:49 PM, pnerkar [EMAIL PROTECTED] wrote: Hi All, I have rendered a list view on a Web Page. vehicle1X vehicle2X vehicle3X

Re: How to delete an item from List view.

2008-02-01 Thread Martijn Dashorst
see wicket-extensions Martijn On 2/1/08, pnerkar [EMAIL PROTECTED] wrote: Hi Eelco, RefreshingView is available in wicket 1.3.0. While I'm using wicket 1.2.6. Regards, Pankaj,... Eelco Hillenius wrote: On Jan 31, 2008 3:49 PM, pnerkar [EMAIL PROTECTED] wrote: Hi All, I

Re: How to delete an item from List view.

2008-02-01 Thread pnerkar
Hi Igor, Finally I'm able to find out the exact issue. suppose There are 3 items in the list- wicket will assign id as 0, 1 2. to those items. So When we say item.getparent().remove(item) to item with id=1, them It'll remove that item from list but item with id=2 will not remain as it is..

Re: How to delete an item from List view.

2008-02-01 Thread Igor Vaynberg
dont use a listview, use a refreshingview and provide an itemreuse strategy. -igor On Feb 1, 2008 1:51 PM, pnerkar [EMAIL PROTECTED] wrote: Hi Igor, Finally I'm able to find out the exact issue. suppose There are 3 items in the list- wicket will assign id as 0, 1 2. to those items. So

Re: How to delete an item from List view.

2008-02-01 Thread pnerkar
Ya I tried refreshingview with ReuseIfModelsEqualStrategy, But the data entered on page get cleared. My new code is - final VehiclesList vehicles = new VehiclesList(vehicles, new PropertyModel((RatingRequestAuto)getModelObject(),vehicles)); vehicles.setOutputMarkupId(true);

Re: How to delete an item from List view.

2008-02-01 Thread Igor Vaynberg
for the strategy to work properly you have to implement equals/hashcode on the model, looks like you are just doing: new Model( (Vehicle) ((List)getModelObject()).get(i)) Model does not implement equals/hashcode -igor On Feb 1, 2008 4:03 PM, pnerkar [EMAIL PROTECTED] wrote: Ya I tried

Re: How to delete an item from List view.

2008-02-01 Thread pnerkar
Hi igor, Ya I read this from one of ur doc. http://www.wicketframework.org/wicket-extensions/apidocs/wicket/extensions/markup/html/repeater/refreshing/ReuseIfModelsEqualStrategy.html I have implemented equals/hashcode in Vehicle object. -pnerkar igor.vaynberg wrote: for the strategy to

Re: How to delete an item from List view.

2008-02-01 Thread Igor Vaynberg
read the notice part of the javadoc... -igor On Feb 1, 2008 5:49 PM, pnerkar [EMAIL PROTECTED] wrote: Hi igor, Ya I read this from one of ur doc. http://www.wicketframework.org/wicket-extensions/apidocs/wicket/extensions/markup/html/repeater/refreshing/ReuseIfModelsEqualStrategy.html I

Re: How to delete an item from List view.

2008-01-31 Thread Igor Vaynberg
show us how you populate your listview... -igor On Jan 31, 2008 3:49 PM, pnerkar [EMAIL PROTECTED] wrote: Hi All, I have rendered a list view on a Web Page. vehicle1X vehicle2X vehicle3X when a person click on 'X', that item should be deleted. But I'm facing an issue,

Re: How to delete an item from List view.

2008-01-31 Thread pnerkar
Hi, Following is my code for rendering vehicle list- final VehiclesList vehicles = new VehiclesList(vehicledetails, ((RatingRequestAuto)getModelObject()).getVehicles()); vehicles.setOutputMarkupId(true); vehicles.setReuseItems(true);

Re: How to delete an item from List view.

2008-01-31 Thread Igor Vaynberg
vehicles.setReuseItems(true); == that is what is causing your list to reuse old components -igor On Jan 31, 2008 5:36 PM, pnerkar [EMAIL PROTECTED] wrote: Hi, Following is my code for rendering vehicle list- final VehiclesList vehicles = new VehiclesList(vehicledetails,

Re: How to delete an item from List view.

2008-01-31 Thread pnerkar
Hi igor, But If I remove setReuseItems(true), it'll remove all field values which user has entered will be removed. Bcz default processing is false for Remove button (Sorry forget to tell you) I just want to remove vehicle2, but the values entered for vehicle1 vehicle3 should not be lost. -

Re: How to delete an item from List view.

2008-01-31 Thread Igor Vaynberg
try this: onpopulate (final listitem item) { add(new link(remove) { onclick() { item.getparent().remove(item); }} } -igor On Jan 31, 2008 6:19 PM, pnerkar [EMAIL PROTECTED] wrote: Hi igor, But If I remove setReuseItems(true), it'll remove all field values which user has entered

Re: How to delete an item from List view.

2008-01-31 Thread Timo Rantalaiho
On Thu, 31 Jan 2008, pnerkar wrote: public void onSubmit() { List vehicles = (List) getParent().getParent().getModelObject(); vehicles.remove(index); } As a cleaner way to do this you could try ListVehicle vehicles = findParent(VehiclesList.class).getModelObject(); Best

Re: How to delete an item from List view.

2008-01-31 Thread Igor Vaynberg
if you want to talk about a cleaner way... add(new removelink(remove, item.getmodel()) { onclick() { vehicles.remove(getmodelobject()); } } assuming vehicles is a property on listview's parent... -igor On Jan 31, 2008 7:29 PM, Timo Rantalaiho [EMAIL PROTECTED] wrote: On Thu, 31

Re: How to delete an item from List view.

2008-01-31 Thread Eelco Hillenius
On Jan 31, 2008 3:49 PM, pnerkar [EMAIL PROTECTED] wrote: Hi All, I have rendered a list view on a Web Page. vehicle1X vehicle2X vehicle3X when a person click on 'X', that item should be deleted. But I'm facing an issue, when i click on 'X', last item get deleted. Actually

Re: How to delete an item from List view.

2008-01-31 Thread pnerkar
Hi igor, I have tried this, Now when I click on remove - it just clear all fields for vehicle2. But none of them get deleted. -pnerkar igor.vaynberg wrote: try this: onpopulate (final listitem item) { add(new link(remove) { onclick() { item.getparent().remove(item); }} }