Re: DataView or GridView with two columns by item

2011-10-26 Thread Tito
Thank you Igor! I forgot that. It works ok! Tito 2011/10/25 Igor Vaynberg igor.vaynb...@gmail.com you never say item.add(contentRow, detailsRow); and you dont need to override newItem() at all -igor On Tue, Oct 25, 2011 at 8:30 AM, Tito njyt...@gmail.com wrote: I thought that I had to

Re: DataView or GridView with two columns by item

2011-10-25 Thread Tito
Hi, Wicket container works ok! But making trs webmarkupcontainers doesn't allow me to populate items of the table because it change hierarchy of components, and I can't get WebMarkupContainers from Item. I mean, before I had: wicket:container wicket:id=dedications tr tdspan

Re: DataView or GridView with two columns by item

2011-10-25 Thread Josh Kamau
You can always use component#renderBodyOnly(true) method to ensure that the containers markup is not rendered. Josh. On Tue, Oct 25, 2011 at 2:33 PM, Tito njyt...@gmail.com wrote: Hi, Wicket container works ok! But making trs webmarkupcontainers doesn't allow me to populate items of the

Re: DataView or GridView with two columns by item

2011-10-25 Thread Tito
Yes, but I think this is not the problem. I have not problems with wicket:container, my problem is that I can't modify class attribute of tr to add Odd or Even. Tito 2011/10/25 Josh Kamau joshnet2...@gmail.com You can always use component#renderBodyOnly(true) method to ensure that the

Re: DataView or GridView with two columns by item

2011-10-25 Thread Josh Kamau
Have you tried using attributeModifiers or attributeAppenders to add or modify a css class? Josh On Tue, Oct 25, 2011 at 4:21 PM, Tito njyt...@gmail.com wrote: Yes, but I think this is not the problem. I have not problems with wicket:container, my problem is that I can't modify class

Re: DataView or GridView with two columns by item

2011-10-25 Thread Tito
Yes I tried but the problem is I can't get MarkupContainer to add the AttributeModifierBehavior. I don't know how to get a container that represents tr tag. 2011/10/25 Josh Kamau joshnet2...@gmail.com Have you tried using attributeModifiers or attributeAppenders to add or modify a css class?

Re: DataView or GridView with two columns by item

2011-10-25 Thread Igor Vaynberg
populateitem(item) { OddEvenItem tr1=new OddEvenItem(tr1, item.getindex(), item.getmodel()); OddEvenItem tr2=new OddEvenItem(tr1, item.getindex(), item.getmodel()); item.add(tr1, tr2); tr1.add(...); tr2.add(...); } -igor On Tue, Oct 25, 2011 at 7:37 AM, Tito njyt...@gmail.com wrote:

Re: DataView or GridView with two columns by item

2011-10-25 Thread Tito
I thought that I had to create Items on newItem method. Anyway, I tried this but it doesn't work. Perhaps I'm doing something wrong, this is my test: @Override protected void populateItem(ItemDedication item) { DateFormat formatter = new SimpleDateFormat(hh:mm); final Dedication dedication =

Re: DataView or GridView with two columns by item

2011-10-25 Thread Igor Vaynberg
you never say item.add(contentRow, detailsRow); and you dont need to override newItem() at all -igor On Tue, Oct 25, 2011 at 8:30 AM, Tito njyt...@gmail.com wrote: I thought that I had to create Items on newItem method. Anyway, I tried this but it doesn't work. Perhaps I'm doing something

DataView or GridView with two columns by item

2011-10-24 Thread Tito
Hi, I'm trying to make a table with two columns by item. I mean, my item have to generate two columns. The first have attributes of the object, the second have another attribute with details. I can't do this. I made tests with DataView and GridView. I don't know what is the best component. Could

Re: DataView or GridView with two columns by item

2011-10-24 Thread Igor Vaynberg
dataview/listview/datatable should all work just fine, post your code. -igor On Mon, Oct 24, 2011 at 5:06 AM, Tito njyt...@gmail.com wrote: Hi, I'm trying to make a table with two columns by item. I mean, my item have to generate two columns. The first have attributes of the object, the

Re: DataView or GridView with two columns by item

2011-10-24 Thread Tito
Hi Igor this is what i'm doing: .java public DedicationsReportPanel(String id, IModelUsers user, final IModelDate dayOfReport) { super(id); add(new DataViewDedication(dedications, new DedicationDataProvider(dedicationService, user.getObject().getUserName())) { @Override protected void

Re: DataView or GridView with two columns by item

2011-10-24 Thread Igor Vaynberg
ahhh. so you want two *rows* not two *columns* per item, attach the repeater to a wicket:container tag like so: wicket:container wicket:id=repeater trtd.../tr trtd/tr /wicket:container you will have to rig up odd/even yourself -igor On Mon, Oct 24, 2011 at 9:10 AM, Tito

Re: DataView or GridView with two columns by item

2011-10-24 Thread Tito
I'm sorry, you are right! I said columns but I meant Rows! What is the java component for wicket container? How do you suggest to add Odd, Even classes? Thank you! 2011/10/24 Igor Vaynberg igor.vaynb...@gmail.com ahhh. so you want two *rows* not two *columns* per item, attach the

Re: DataView or GridView with two columns by item

2011-10-24 Thread Igor Vaynberg
On Mon, Oct 24, 2011 at 9:31 AM, Tito njyt...@gmail.com wrote: I'm sorry, you are right! I said columns but I meant Rows! What is the java component for wicket container? no need for a java component, wicket:container is an auto tag like wicket:message How do you suggest to add Odd, Even