You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by smallufo <sm...@gmail.com> on 2008/06/02 22:18:39 UTC

Wrap a ListView and it cannot be updated via AJAX ?

I have a WebPage , containing a gmap2 and a Panel with a ListView inside.
I added the panel to the gmap2's onClick(AjaxRequestTarget ...) ,
So when user clicks the gmap , the ListView (in the Panel) will be updated.
It worked fine.

Today , I want to add a "show/hide" link in the panel , to show/hide the
ListView.

Because of the error :
"This component is a repeater and cannot be repainted via ajax directly"
so , I wrap the ListView with a WebMarkupContainer : listViewContainer.
And I also added this :
listViewContainer.setOutputMarkupPlaceholderTag(true);

The listView show/hide now works fine.
BUT , when user clicks the gmap , the ListView doesn't update anymore.
Why ?
Is there any solutions ? Thanks a lot.

Re: Wrap a ListView and it cannot be updated via AJAX ?

Posted by smallufo <sm...@gmail.com>.
Does it has something to do with isTransparentResolver() , so that the
listViewContainer is transparent between the panel and the listView ?
But WebMarkupContainer seems doesn't have setTransparentResolver() method...


2008/6/3 smallufo <sm...@gmail.com>:

>
>
> 2008/6/3 Gwyn Evans <gw...@gmail.com>:
>
>> If you're hiding the container, try setting it to output a placeholder id
>> too.
>>
>
> Hmmm
> It still not works... :(
>
> In fact , there is no need to setOutputMarkupId(true) , because calling
> setOutputMarkupPlaceholderTag(true) internally calls setOutputMarkupId(true)
> too.
>
>
>

Re: Wrap a ListView and it cannot be updated via AJAX ?

Posted by smallufo <sm...@gmail.com>.
2008/6/3 Gwyn Evans <gw...@gmail.com>:

> If you're hiding the container, try setting it to output a placeholder id
> too.
>

Hmmm
It still not works... :(

In fact , there is no need to setOutputMarkupId(true) , because calling
setOutputMarkupPlaceholderTag(true) internally calls setOutputMarkupId(true)
too.

Re: Wrap a ListView and it cannot be updated via AJAX ?

Posted by Gwyn Evans <gw...@gmail.com>.
If you're hiding the container, try setting it to output a placeholder id too.

/Gwyn

On Mon, Jun 2, 2008 at 11:21 PM, smallufo <sm...@gmail.com> wrote:
> Hi
>
> I tried to export the listViewContainer with "getListViewContainer()"
> and in the gmap2's ClickListener : onClick() :
> target.addComponent(panel);
> target.addComponent(panel.getListViewContainer());
>
> But it's still not updated.
>
>
> 2008/6/3 greeklinux <ma...@gmx.net>:
>
>>
>> Hello,
>>
>> I do not work with wicket ajax so far...but I think you have to update
>> the whole container.
>>
>> regards
>>
>>
>> smallufo wrote:
>> >
>> > I have a WebPage , containing a gmap2 and a Panel with a ListView inside.
>> > I added the panel to the gmap2's onClick(AjaxRequestTarget ...) ,
>> > So when user clicks the gmap , the ListView (in the Panel) will be
>> > updated.
>> > It worked fine.
>> >
>> > Today , I want to add a "show/hide" link in the panel , to show/hide the
>> > ListView.
>> >
>> > Because of the error :
>> > "This component is a repeater and cannot be repainted via ajax directly"
>> > so , I wrap the ListView with a WebMarkupContainer : listViewContainer.
>> > And I also added this :
>> > listViewContainer.setOutputMarkupPlaceholderTag(true);
>> >
>> > The listView show/hide now works fine.
>> > BUT , when user clicks the gmap , the ListView doesn't update anymore.
>> > Why ?
>> > Is there any solutions ? Thanks a lot.
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Wrap-a-ListView-and-it-cannot-be-updated-via-AJAX---tp17609927p17611958.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wrap a ListView and it cannot be updated via AJAX ?

Posted by smallufo <sm...@gmail.com>.
Hi

I tried to export the listViewContainer with "getListViewContainer()"
and in the gmap2's ClickListener : onClick() :
target.addComponent(panel);
target.addComponent(panel.getListViewContainer());

But it's still not updated.


2008/6/3 greeklinux <ma...@gmx.net>:

>
> Hello,
>
> I do not work with wicket ajax so far...but I think you have to update
> the whole container.
>
> regards
>
>
> smallufo wrote:
> >
> > I have a WebPage , containing a gmap2 and a Panel with a ListView inside.
> > I added the panel to the gmap2's onClick(AjaxRequestTarget ...) ,
> > So when user clicks the gmap , the ListView (in the Panel) will be
> > updated.
> > It worked fine.
> >
> > Today , I want to add a "show/hide" link in the panel , to show/hide the
> > ListView.
> >
> > Because of the error :
> > "This component is a repeater and cannot be repainted via ajax directly"
> > so , I wrap the ListView with a WebMarkupContainer : listViewContainer.
> > And I also added this :
> > listViewContainer.setOutputMarkupPlaceholderTag(true);
> >
> > The listView show/hide now works fine.
> > BUT , when user clicks the gmap , the ListView doesn't update anymore.
> > Why ?
> > Is there any solutions ? Thanks a lot.
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Wrap-a-ListView-and-it-cannot-be-updated-via-AJAX---tp17609927p17611958.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Wrap a ListView and it cannot be updated via AJAX ?

Posted by greeklinux <ma...@gmx.net>.
Hello,

I do not work with wicket ajax so far...but I think you have to update
the whole container.

regards


smallufo wrote:
> 
> I have a WebPage , containing a gmap2 and a Panel with a ListView inside.
> I added the panel to the gmap2's onClick(AjaxRequestTarget ...) ,
> So when user clicks the gmap , the ListView (in the Panel) will be
> updated.
> It worked fine.
> 
> Today , I want to add a "show/hide" link in the panel , to show/hide the
> ListView.
> 
> Because of the error :
> "This component is a repeater and cannot be repainted via ajax directly"
> so , I wrap the ListView with a WebMarkupContainer : listViewContainer.
> And I also added this :
> listViewContainer.setOutputMarkupPlaceholderTag(true);
> 
> The listView show/hide now works fine.
> BUT , when user clicks the gmap , the ListView doesn't update anymore.
> Why ?
> Is there any solutions ? Thanks a lot.
> 
> 

-- 
View this message in context: http://www.nabble.com/Wrap-a-ListView-and-it-cannot-be-updated-via-AJAX---tp17609927p17611958.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org