Hi:
Sven, thanks for replying!
I've added some code below.
------------------------------------------------------------------
class MyPage:
private List businessObjectList;
private MyPanel myPanel;
<list is populated somehow>
myPanel = new MyPanel(businessObjectList);
this.add(myPanel);
...
<on some behavior>
-> target.addComponent(myPanel);
-------------------------------------------------------------
class MyPanel(businessObjectList):
this.add(SomeComponent(first element of businessObjectList));
this.add(new ListView(businessObjectList wihout first element){ ... });
----------------------------------------------------------
I'm aware that as the panel receives a modelObject and not a model, then
when it's refreshed it will show the previous list. So, I was thinking
about myPanel receiving a PropertyModel(this, businessObjectList), but the
thing is: how can it retrieve the first business object (which needs to be
shown differently) in a "dynamic way" so when the panel is refreshed, it
will take it from the new list (I could use another repeater that will loop
only once, but I was hoping there's a nicer way).
Thanks again,
NM
On Thu, Oct 8, 2009 at 7:50 PM, Sven Meier <[email protected]> wrote:
> Hi Nicolas,
>
> you can just use a WebMarkupContainer and recreate its children on each
> request in #onBeforeRender().
>
> But the question is: why do you need to refresh your components at all? It
> seems you don't use models correctly.
> Show us some code.
>
> Sven
>
>
> Nicolas Melendez wrote:
>
>> Hi, i want to use a ListView to use the onpopulate method so when the
>> panel
>> refresh i can see the new data.But the listView has always one element and
>> i
>> think it was made for lots of elements.
>> Something is wrong in the way i am thinking.
>> Any suggestion?
>>
>> NM
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>