How about just use PropertyListView?
On Thu, Oct 23, 2008 at 9:39 AM, pieter claassen <[EMAIL PROTECTED]> wrote:
> Guys, thanks for all your feedback. You were right.
>
> Cheers,
> Pieter
>
> On Oct 23, 2008, at 2:44 PM, Jeremy Thomerson wrote:
>
>> Johan nailed it... here are your bad lines:
>>
>
Guys, thanks for all your feedback. You were right.
Cheers,
Pieter
On Oct 23, 2008, at 2:44 PM, Jeremy Thomerson wrote:
Johan nailed it... here are your bad lines:
System.out.println("+++"+
item.getModelObject().getClass().getName());
final QuestionAndAnswer qanda = (QuestionAndAnswer
Johan nailed it... here are your bad lines:
System.out.println("+++"+
item.getModelObject().getClass().getName());
final QuestionAndAnswer qanda = (QuestionAndAnswer)
item.getModelObject();
setModel(new CompoundPropertyModel(qanda));
That should just be changed to:
item.setModel(
What are you doing there?
You get a model object from the listitem
And then you are calling setmodel(compound) on the listview itself?
Why is that then you are changing the model of the listview inside the
loop that it goes over them creating listitems!
On 10/23/08, pieter claassen <[EMAIL PROTECT
uot;
instead of "questions" and try again..
by the way are you sure that you've rebuilt and redeployed your
application..
--
View this message in context:
http://www.nabble.com/ListView-broken--tp20126952p20128604.html
Sent from the Wicket - User mail
So, what does it print when you print out the class name?
On Thu, Oct 23, 2008 at 6:24 AM, pieter claassen <[EMAIL PROTECTED]> wrote:
> Ok, I might be doing something thats not ok but . there are not two
> ListViews on this page (there are 3 forms? Is this a problem?)
> ClassCastException is t
Ok, I might be doing something thats not ok but . there are not
two ListViews on this page (there are 3 forms? Is this a problem?)
ClassCastException is throw at System.out.println("")
package com.musmato.wicket.pages.templates;
import java.util.Arrays;
import org.apache.wicket.mar
The classcastexception happens on retrieving the N-th item from the
list. The class cast tries to cast the model object of the listview to
a List. Apparently the argument to the listview is not a List, but
somethign that returns a QuestionAndAnswer.
Are you looking at the correct ListView (i.e. ar
pass , sorry i have no clue
On Thu, Oct 23, 2008 at 10:37 AM, pieter claassen <[EMAIL PROTECTED]>wrote:
> Ok, I added;
>
> public class Debug {
>public static void debug(List list) {
>for (Object item : list) {
>System.out.println("++DEBUG++: " +
>
Ok, I added;
public class Debug {
public static void debug(List list) {
for (Object item : list) {
System.out.println("++DEBUG++: " +
item.getClass().toString());
}
}
and called debug just before I returned my ArrayList of
can't you check what exactly is being returned by template.getQuestions()
and if its a list what are the items in it
On Thu, Oct 23, 2008 at 10:10 AM, pieter claassen <[EMAIL PROTECTED]>wrote:
> Hi Dipu,
>
> I tried that but when I do the following:
>
>protected void populateI
Hi Dipu,
I tried that but when I do the following:
protected void populateItem(ListItem item) {
System.out.println("+++" +
item.getModelObject().getClass().getName());
final QuestionAndAnswer qanda = (QuestionAndAnswer)
item.getModelObject();
I find that I now get
ds,
Pieter
pieter claassen
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
View this message in context:
http://www.nabble.com/ListView-broken--tp2012695
AIL PROTECTED]
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Li
looks like template.getQuestions() is returning a list with items in it
which is not of the type QuestionAndAnswer
try iterating through the list and logging the class name of each item in it
Dipu
On Thu, Oct 23, 2008 at 9:46 AM, pieter claassen <[EMAIL PROTECTED]>wrote:
> I am getting a cl
I am getting a classcast exception in ListView that is stumping me.
This is the error message (top few lines)
WicketMessage: Error attaching this container for rendering:
[MarkupContainer [Component id = questioneditform]]
Root cause:
java.lang.ClassCastException: com.musmato.model.Question
16 matches
Mail list logo