new model(listdata) is the same as a static reference. like i said,
read the models page because without understanding them you wont get
far.
basically you would have a loadabledetachablemodel that in its load
performs the search query based on user's criteria.
-igor
On Wed, Apr 2, 2008 at 1:06 AM, Sathish Gopal <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> How do i wrap list to this model.
> As i construct this ListView component, pass the DTO list wrapped in a
> model....
>
> add(new ListView("id", new Model(listData))){
> ......................
> }
>
> This is not helping as the component is rendered nothing shows up. I think
> i'm missing something.
>
> Do i need to use some other Model (A Dynamic model). Do i need to override
> initModel()...
>
> Am i doing it the right way?
>
>
>
>
> igor.vaynberg wrote:
> >
> > read models wiki page
> >
> > -igor
> >
> >
> > On Tue, Apr 1, 2008 at 9:59 PM, Sathish Gopal <[EMAIL PROTECTED]>
> > wrote:
> >>
> >> Hi all,
> >>
> >> I'm trying to create a table using wickets repeater component ListView.
> >> The
> >> problem that i face now is i have search panel where search query will
> >> be
> >> entered. When the form is submitted the table needs to be populated with
> >> data received from the Database. The data received from the database is
> >> a
> >> list of DataTransferObjects. I need to pass this List of transferObjects
> >> to
> >> the ListView. But the listview expects that this object should be passed
> >> at
> >> the time of creation. i.e
> >>
> >> add(new ListView("rows", listData){
> >> public void populateItem(final ListItem item)
> >> {
> >> final UserDetails user =
> >> (UserDetails)item.getModelObject();
> >> item.add(new Label("id", user.getId()));
> >> }
> >> });
> >>
> >> I cannot pass the list of DataTransferObject until the user enters
> >> search
> >> criteria and submits the form.
> >> Is there any better way to do this?
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Reg%3A-issue-in-using-ListView-component-tp16442209p16442209.html
> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Reg%3A-issue-in-using-ListView-component-tp16442209p16444480.html
>
>
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]