You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Altuğ Bilgin Altıntaş <al...@gmail.com> on 2011/01/10 08:55:16 UTC
removing SimpleAttributeModifier after added
Hi,
Java code:
final WebMarkupContainer delete = new WebMarkupContainer("delete");
delete.setOutputMarkupPlaceholderTag(true);
delete.add(new SimpleAttributeModifier("filter", "false"));
html :
<th wicket:id="delete"> </th>
then after i want to remove SimpleAttributeModifier - filter" from
WebMarkupContainer - delete,
Are there any way to to this ?
Thanks.
--
*Altuğ*
** <http://www.kodcu.com>
Re: removing SimpleAttributeModifier after added
Posted by Altuğ Bilgin Altıntaş <al...@gmail.com>.
Thanks Martin.
2011/1/10 Martin Grigorov <mg...@apache.org>
> 2011/1/10 Altuğ Bilgin Altıntaş <al...@gmail.com>
>
> > your solutions are hack but ok.
> >
> > invisible is ok but what if i wanna change the DOM structure...
> >
> then you need to use Panels
> use one Panel for structure1 and another panel for structure2, and Wicket's
> EmptyPanel when you want to remove the sub-tree
> just replace the panels depending on your conditions
> it doesn't look like a hack to me
>
> >
> >
> >
> > 2011/1/10 andrea del bene <an...@libero.it>
> >
> > > Or simply make it invisible
> > >
> > > replace it with dummy one that renders nothing
> > >>
> > >> 2011/1/10 Altuğ Bilgin Altıntaş<al...@gmail.com>
> > >>
> > >> Thanks. Also i want to know if i remove an component from Java side
> > >>>
> > >>> final WebMarkupContainer delete = new WebMarkupContainer("delete");
> > >>> add (delete )
> > >>>
> > >>> after than
> > >>>
> > >>> remove(delete );
> > >>>
> > >>> gives error because on html side tag is still there.
> > >>>
> > >>> How to remove a component without markup error.
> > >>>
> > >>> Thanks.
> > >>>
> > >>>
> > >>> 2011/1/10 Martin Grigorov<mg...@apache.org>
> > >>>
> > >>> Component#remove(behavior)
> > >>>> you need to keep a reference to the behavior or you may iterate over
> > the
> > >>>> behavior and remove the one that match your criteria
> > >>>>
> > >>>> 2011/1/10 Altuğ Bilgin Altıntaş<al...@gmail.com>
> > >>>>
> > >>>> Hi,
> > >>>>>
> > >>>>> Java code:
> > >>>>>
> > >>>>> final WebMarkupContainer delete = new WebMarkupContainer("delete");
> > >>>>> delete.setOutputMarkupPlaceholderTag(true);
> > >>>>> delete.add(new SimpleAttributeModifier("filter", "false"));
> > >>>>>
> > >>>>> html :
> > >>>>>
> > >>>>> <th wicket:id="delete"> </th>
> > >>>>>
> > >>>>> then after i want to remove SimpleAttributeModifier - filter" from
> > >>>>> WebMarkupContainer - delete,
> > >>>>>
> > >>>>> Are there any way to to this ?
> > >>>>>
> > >>>>> Thanks.
> > >>>>>
> > >>>>> --
> > >>>>> *Altuğ*
> > >>>>> **<http://www.kodcu.com>
> > >>>>>
> > >>>>>
> > >>>
> > >>> --
> > >>> *Altuğ*
> > >>> *www.kodcu.com*<http://www.kodcu.com>**
> > >>>
> > >>>
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> >
> > --
> > *Altuğ*
> > *www.kodcu.com* <http://www.kodcu.com>**
> >
>
--
*Altuğ*
*www.kodcu.com* <http://www.kodcu.com>**
Re: removing SimpleAttributeModifier after added
Posted by Martin Grigorov <mg...@apache.org>.
2011/1/10 Altuğ Bilgin Altıntaş <al...@gmail.com>
> your solutions are hack but ok.
>
> invisible is ok but what if i wanna change the DOM structure...
>
then you need to use Panels
use one Panel for structure1 and another panel for structure2, and Wicket's
EmptyPanel when you want to remove the sub-tree
just replace the panels depending on your conditions
it doesn't look like a hack to me
>
>
>
> 2011/1/10 andrea del bene <an...@libero.it>
>
> > Or simply make it invisible
> >
> > replace it with dummy one that renders nothing
> >>
> >> 2011/1/10 Altuğ Bilgin Altıntaş<al...@gmail.com>
> >>
> >> Thanks. Also i want to know if i remove an component from Java side
> >>>
> >>> final WebMarkupContainer delete = new WebMarkupContainer("delete");
> >>> add (delete )
> >>>
> >>> after than
> >>>
> >>> remove(delete );
> >>>
> >>> gives error because on html side tag is still there.
> >>>
> >>> How to remove a component without markup error.
> >>>
> >>> Thanks.
> >>>
> >>>
> >>> 2011/1/10 Martin Grigorov<mg...@apache.org>
> >>>
> >>> Component#remove(behavior)
> >>>> you need to keep a reference to the behavior or you may iterate over
> the
> >>>> behavior and remove the one that match your criteria
> >>>>
> >>>> 2011/1/10 Altuğ Bilgin Altıntaş<al...@gmail.com>
> >>>>
> >>>> Hi,
> >>>>>
> >>>>> Java code:
> >>>>>
> >>>>> final WebMarkupContainer delete = new WebMarkupContainer("delete");
> >>>>> delete.setOutputMarkupPlaceholderTag(true);
> >>>>> delete.add(new SimpleAttributeModifier("filter", "false"));
> >>>>>
> >>>>> html :
> >>>>>
> >>>>> <th wicket:id="delete"> </th>
> >>>>>
> >>>>> then after i want to remove SimpleAttributeModifier - filter" from
> >>>>> WebMarkupContainer - delete,
> >>>>>
> >>>>> Are there any way to to this ?
> >>>>>
> >>>>> Thanks.
> >>>>>
> >>>>> --
> >>>>> *Altuğ*
> >>>>> **<http://www.kodcu.com>
> >>>>>
> >>>>>
> >>>
> >>> --
> >>> *Altuğ*
> >>> *www.kodcu.com*<http://www.kodcu.com>**
> >>>
> >>>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
>
> --
> *Altuğ*
> *www.kodcu.com* <http://www.kodcu.com>**
>
Re: removing SimpleAttributeModifier after added
Posted by Altuğ Bilgin Altıntaş <al...@gmail.com>.
your solutions are hack but ok.
invisible is ok but what if i wanna change the DOM structure...
2011/1/10 andrea del bene <an...@libero.it>
> Or simply make it invisible
>
> replace it with dummy one that renders nothing
>>
>> 2011/1/10 Altuğ Bilgin Altıntaş<al...@gmail.com>
>>
>> Thanks. Also i want to know if i remove an component from Java side
>>>
>>> final WebMarkupContainer delete = new WebMarkupContainer("delete");
>>> add (delete )
>>>
>>> after than
>>>
>>> remove(delete );
>>>
>>> gives error because on html side tag is still there.
>>>
>>> How to remove a component without markup error.
>>>
>>> Thanks.
>>>
>>>
>>> 2011/1/10 Martin Grigorov<mg...@apache.org>
>>>
>>> Component#remove(behavior)
>>>> you need to keep a reference to the behavior or you may iterate over the
>>>> behavior and remove the one that match your criteria
>>>>
>>>> 2011/1/10 Altuğ Bilgin Altıntaş<al...@gmail.com>
>>>>
>>>> Hi,
>>>>>
>>>>> Java code:
>>>>>
>>>>> final WebMarkupContainer delete = new WebMarkupContainer("delete");
>>>>> delete.setOutputMarkupPlaceholderTag(true);
>>>>> delete.add(new SimpleAttributeModifier("filter", "false"));
>>>>>
>>>>> html :
>>>>>
>>>>> <th wicket:id="delete"> </th>
>>>>>
>>>>> then after i want to remove SimpleAttributeModifier - filter" from
>>>>> WebMarkupContainer - delete,
>>>>>
>>>>> Are there any way to to this ?
>>>>>
>>>>> Thanks.
>>>>>
>>>>> --
>>>>> *Altuğ*
>>>>> **<http://www.kodcu.com>
>>>>>
>>>>>
>>>
>>> --
>>> *Altuğ*
>>> *www.kodcu.com*<http://www.kodcu.com>**
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
*Altuğ*
*www.kodcu.com* <http://www.kodcu.com>**
Re: removing SimpleAttributeModifier after added
Posted by andrea del bene <an...@libero.it>.
Or simply make it invisible
> replace it with dummy one that renders nothing
>
> 2011/1/10 Altuğ Bilgin Altıntaş<al...@gmail.com>
>
>> Thanks. Also i want to know if i remove an component from Java side
>>
>> final WebMarkupContainer delete = new WebMarkupContainer("delete");
>> add (delete )
>>
>> after than
>>
>> remove(delete );
>>
>> gives error because on html side tag is still there.
>>
>> How to remove a component without markup error.
>>
>> Thanks.
>>
>>
>> 2011/1/10 Martin Grigorov<mg...@apache.org>
>>
>>> Component#remove(behavior)
>>> you need to keep a reference to the behavior or you may iterate over the
>>> behavior and remove the one that match your criteria
>>>
>>> 2011/1/10 Altuğ Bilgin Altıntaş<al...@gmail.com>
>>>
>>>> Hi,
>>>>
>>>> Java code:
>>>>
>>>> final WebMarkupContainer delete = new WebMarkupContainer("delete");
>>>> delete.setOutputMarkupPlaceholderTag(true);
>>>> delete.add(new SimpleAttributeModifier("filter", "false"));
>>>>
>>>> html :
>>>>
>>>> <th wicket:id="delete"> </th>
>>>>
>>>> then after i want to remove SimpleAttributeModifier - filter" from
>>>> WebMarkupContainer - delete,
>>>>
>>>> Are there any way to to this ?
>>>>
>>>> Thanks.
>>>>
>>>> --
>>>> *Altuğ*
>>>> **<http://www.kodcu.com>
>>>>
>>
>>
>> --
>> *Altuğ*
>> *www.kodcu.com*<http://www.kodcu.com>**
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: removing SimpleAttributeModifier after added
Posted by Martin Grigorov <mg...@apache.org>.
replace it with dummy one that renders nothing
2011/1/10 Altuğ Bilgin Altıntaş <al...@gmail.com>
> Thanks. Also i want to know if i remove an component from Java side
>
> final WebMarkupContainer delete = new WebMarkupContainer("delete");
> add (delete )
>
> after than
>
> remove(delete );
>
> gives error because on html side tag is still there.
>
> How to remove a component without markup error.
>
> Thanks.
>
>
> 2011/1/10 Martin Grigorov <mg...@apache.org>
>
> > Component#remove(behavior)
> > you need to keep a reference to the behavior or you may iterate over the
> > behavior and remove the one that match your criteria
> >
> > 2011/1/10 Altuğ Bilgin Altıntaş <al...@gmail.com>
> >
> > > Hi,
> > >
> > > Java code:
> > >
> > > final WebMarkupContainer delete = new WebMarkupContainer("delete");
> > > delete.setOutputMarkupPlaceholderTag(true);
> > > delete.add(new SimpleAttributeModifier("filter", "false"));
> > >
> > > html :
> > >
> > > <th wicket:id="delete"> </th>
> > >
> > > then after i want to remove SimpleAttributeModifier - filter" from
> > > WebMarkupContainer - delete,
> > >
> > > Are there any way to to this ?
> > >
> > > Thanks.
> > >
> > > --
> > > *Altuğ*
> > > ** <http://www.kodcu.com>
> > >
> >
>
>
>
> --
> *Altuğ*
> *www.kodcu.com* <http://www.kodcu.com>**
>
Re: removing SimpleAttributeModifier after added
Posted by Altuğ Bilgin Altıntaş <al...@gmail.com>.
Thanks. Also i want to know if i remove an component from Java side
final WebMarkupContainer delete = new WebMarkupContainer("delete");
add (delete )
after than
remove(delete );
gives error because on html side tag is still there.
How to remove a component without markup error.
Thanks.
2011/1/10 Martin Grigorov <mg...@apache.org>
> Component#remove(behavior)
> you need to keep a reference to the behavior or you may iterate over the
> behavior and remove the one that match your criteria
>
> 2011/1/10 Altuğ Bilgin Altıntaş <al...@gmail.com>
>
> > Hi,
> >
> > Java code:
> >
> > final WebMarkupContainer delete = new WebMarkupContainer("delete");
> > delete.setOutputMarkupPlaceholderTag(true);
> > delete.add(new SimpleAttributeModifier("filter", "false"));
> >
> > html :
> >
> > <th wicket:id="delete"> </th>
> >
> > then after i want to remove SimpleAttributeModifier - filter" from
> > WebMarkupContainer - delete,
> >
> > Are there any way to to this ?
> >
> > Thanks.
> >
> > --
> > *Altuğ*
> > ** <http://www.kodcu.com>
> >
>
--
*Altuğ*
*www.kodcu.com* <http://www.kodcu.com>**
Re: removing SimpleAttributeModifier after added
Posted by Martin Grigorov <mg...@apache.org>.
Component#remove(behavior)
you need to keep a reference to the behavior or you may iterate over the
behavior and remove the one that match your criteria
2011/1/10 Altuğ Bilgin Altıntaş <al...@gmail.com>
> Hi,
>
> Java code:
>
> final WebMarkupContainer delete = new WebMarkupContainer("delete");
> delete.setOutputMarkupPlaceholderTag(true);
> delete.add(new SimpleAttributeModifier("filter", "false"));
>
> html :
>
> <th wicket:id="delete"> </th>
>
> then after i want to remove SimpleAttributeModifier - filter" from
> WebMarkupContainer - delete,
>
> Are there any way to to this ?
>
> Thanks.
>
> --
> *Altuğ*
> ** <http://www.kodcu.com>
>