Re: Where to disable a child component

2009-02-20 Thread taha siddiqi
Thanks for the response,

That is also a way of doing it but I have too many child components
and it is easy to
just write something like

@Override
protected void onRender( MarkupStream stream ){
   childComponent1.setEnabled( isEnabled() );
   
}

tawus

On Fri, Feb 20, 2009 at 9:44 PM, Jeremy Thomerson
 wrote:
> Why not let you child components override isEnabled() and have part of the
> logic in it check if their parent is enabled?
>
> On Thu, Feb 19, 2009 at 11:25 PM, taha siddiqi wrote:
>
>> Hi,
>>
>> I think I resolved it.  I used FormComponentPanel.onRender( MarkupStream )
>>
>> regards
>> tawus
>>
>> On Fri, Feb 20, 2009 at 10:42 AM, taha siddiqi 
>> wrote:
>> > Hi,
>> >
>> > I have a FormComponentPanel with child components and i need to
>> > disable the children when FormComponentPanel is disabled( isEnabled()
>> > == false ).
>> > I can do that in onBeforeRender() but the problem is that I have to
>> > take the decision on whether to disable the FormComponentPanel in my
>> > IComponentOnBeforeRenderListener.beforeRender() and as this function
>> > is called after FormComponentPanel.onBeforeRender() I am not able
>> > to disable the child components.
>> >
>> > Please help
>> >
>> > thanks in advance
>> > tawus
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>

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



Re: Where to disable a child component

2009-02-20 Thread Jeremy Thomerson
Why not let you child components override isEnabled() and have part of the
logic in it check if their parent is enabled?

On Thu, Feb 19, 2009 at 11:25 PM, taha siddiqi wrote:

> Hi,
>
> I think I resolved it.  I used FormComponentPanel.onRender( MarkupStream )
>
> regards
> tawus
>
> On Fri, Feb 20, 2009 at 10:42 AM, taha siddiqi 
> wrote:
> > Hi,
> >
> > I have a FormComponentPanel with child components and i need to
> > disable the children when FormComponentPanel is disabled( isEnabled()
> > == false ).
> > I can do that in onBeforeRender() but the problem is that I have to
> > take the decision on whether to disable the FormComponentPanel in my
> > IComponentOnBeforeRenderListener.beforeRender() and as this function
> > is called after FormComponentPanel.onBeforeRender() I am not able
> > to disable the child components.
> >
> > Please help
> >
> > thanks in advance
> > tawus
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Jeremy Thomerson
http://www.wickettraining.com


Re: Where to disable a child component

2009-02-19 Thread taha siddiqi
Hi,

I think I resolved it.  I used FormComponentPanel.onRender( MarkupStream )

regards
tawus

On Fri, Feb 20, 2009 at 10:42 AM, taha siddiqi  wrote:
> Hi,
>
> I have a FormComponentPanel with child components and i need to
> disable the children when FormComponentPanel is disabled( isEnabled()
> == false ).
> I can do that in onBeforeRender() but the problem is that I have to
> take the decision on whether to disable the FormComponentPanel in my
> IComponentOnBeforeRenderListener.beforeRender() and as this function
> is called after FormComponentPanel.onBeforeRender() I am not able
> to disable the child components.
>
> Please help
>
> thanks in advance
> tawus
>

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



Where to disable a child component

2009-02-19 Thread taha siddiqi
Hi,

I have a FormComponentPanel with child components and i need to
disable the children when FormComponentPanel is disabled( isEnabled()
== false ).
I can do that in onBeforeRender() but the problem is that I have to
take the decision on whether to disable the FormComponentPanel in my
IComponentOnBeforeRenderListener.beforeRender() and as this function
is called after FormComponentPanel.onBeforeRender() I am not able
to disable the child components.

Please help

thanks in advance
tawus

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