You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Tom Götz <to...@decoded.de> on 2015/11/30 15:54:50 UTC

Enable single components inside a container that is disabled?

Hi there,

I have a form that can be either in „edit“ or „view“ mode. To toggle this, I simply call form.setEnabled(true|false), which works fine.

Now, I have some ajax links inside that form that should be enabled although the form itself is disabled. Yet, I found no way to achieve this, is that doable somehow?

Cheers,
   Tom


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


Re: Enable single components inside a container that is disabled?

Posted by Sven Meier <sv...@meiers.net>.
Hi Tom,

in Wicket 6 that's harder:
you'll have to override #canCallListenerInterface() *and* duplicate 
#renderHeader() to output the JavaScript header item although the owning 
component is not enabled in the hierarchy.

Have fun
Sven


On 01.12.2015 09:31, Tom Götz wrote:
> Thanks for the hint! What about ajax behaviors (e.g. AjaxEventBehavior), is there also a way to enable them inside a disabled container (Wicket 6.x)?
>
> Cheers,
>     Tom
>
>
>> On 30.11.2015, at 16:18, Sven Meier <sv...@meiers.net> wrote:
>>
>> Hi Tom,
>>
>> in Wicket 6 you can override #isLinkEnabled() *and* #canCallListenerInterface() both returning true.
>>
>> Have fun
>> Sven
>>
>> On 30.11.2015 16:06, Tom Götz wrote:
>>> Unfortunately the project ist still running Wicket 6.x :-|
>>>
>>>     Tom
>>>
>>>
>>>> On 30.11.2015, at 15:59, Sven Meier <sv...@meiers.net> wrote:
>>>>
>>>> Hi,
>>>>
>>>> in Wicket 7 your AjaxLinks can override #isEnabledInHierarchy().
>>>>
>>>> Have fun
>>>> Sven
>>>>
>>>>
>>>> On 30.11.2015 15:54, Tom Götz wrote:
>>>>>
>>>>> Hi there,
>>>>>
>>>>> I have a form that can be either in „edit“ or „view“ mode. To toggle this, I simply call form.setEnabled(true|false), which works fine.
>>>>>
>>>>> Now, I have some ajax links inside that form that should be enabled although the form itself is disabled. Yet, I found no way to achieve this, is that doable somehow?
>>>>>
>>>>> Cheers,
>>>>>     Tom
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>
>
>
> ---------------------------------------------------------------------
> 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: Enable single components inside a container that is disabled?

Posted by Tom Götz <to...@decoded.de>.
Thanks for the hint! What about ajax behaviors (e.g. AjaxEventBehavior), is there also a way to enable them inside a disabled container (Wicket 6.x)?

Cheers,
   Tom


> On 30.11.2015, at 16:18, Sven Meier <sv...@meiers.net> wrote:
> 
> Hi Tom,
> 
> in Wicket 6 you can override #isLinkEnabled() *and* #canCallListenerInterface() both returning true.
> 
> Have fun
> Sven
> 
> On 30.11.2015 16:06, Tom Götz wrote:
>> Unfortunately the project ist still running Wicket 6.x :-|
>> 
>>    Tom
>> 
>> 
>>> On 30.11.2015, at 15:59, Sven Meier <sv...@meiers.net> wrote:
>>> 
>>> Hi,
>>> 
>>> in Wicket 7 your AjaxLinks can override #isEnabledInHierarchy().
>>> 
>>> Have fun
>>> Sven
>>> 
>>> 
>>> On 30.11.2015 15:54, Tom Götz wrote:
>>>> 
>>>> Hi there,
>>>> 
>>>> I have a form that can be either in „edit“ or „view“ mode. To toggle this, I simply call form.setEnabled(true|false), which works fine.
>>>> 
>>>> Now, I have some ajax links inside that form that should be enabled although the form itself is disabled. Yet, I found no way to achieve this, is that doable somehow?
>>>> 
>>>> Cheers,
>>>>    Tom
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> 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
> 



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


Re: Enable single components inside a container that is disabled?

Posted by Sven Meier <sv...@meiers.net>.
Hi Tom,

in Wicket 6 you can override #isLinkEnabled() *and* 
#canCallListenerInterface() both returning true.

Have fun
Sven

On 30.11.2015 16:06, Tom Götz wrote:
> Unfortunately the project ist still running Wicket 6.x :-|
>
>     Tom
>
>
>> On 30.11.2015, at 15:59, Sven Meier <sv...@meiers.net> wrote:
>>
>> Hi,
>>
>> in Wicket 7 your AjaxLinks can override #isEnabledInHierarchy().
>>
>> Have fun
>> Sven
>>
>>
>> On 30.11.2015 15:54, Tom Götz wrote:
>>>
>>> Hi there,
>>>
>>> I have a form that can be either in „edit“ or „view“ mode. To toggle this, I simply call form.setEnabled(true|false), which works fine.
>>>
>>> Now, I have some ajax links inside that form that should be enabled although the form itself is disabled. Yet, I found no way to achieve this, is that doable somehow?
>>>
>>> Cheers,
>>>     Tom
>
>
>
> ---------------------------------------------------------------------
> 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: Enable single components inside a container that is disabled?

Posted by Tom Götz <to...@decoded.de>.
Unfortunately the project ist still running Wicket 6.x :-|

   Tom


> On 30.11.2015, at 15:59, Sven Meier <sv...@meiers.net> wrote:
> 
> Hi,
> 
> in Wicket 7 your AjaxLinks can override #isEnabledInHierarchy().
> 
> Have fun
> Sven
> 
> 
> On 30.11.2015 15:54, Tom Götz wrote:
>> 
>> Hi there,
>> 
>> I have a form that can be either in „edit“ or „view“ mode. To toggle this, I simply call form.setEnabled(true|false), which works fine.
>> 
>> Now, I have some ajax links inside that form that should be enabled although the form itself is disabled. Yet, I found no way to achieve this, is that doable somehow?
>> 
>> Cheers,
>>    Tom



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


Re: Enable single components inside a container that is disabled?

Posted by Sven Meier <sv...@meiers.net>.
Hi,

in Wicket 7 your AjaxLinks can override #isEnabledInHierarchy().

Have fun
Sven


On 30.11.2015 15:54, Tom Götz wrote:
>
> Hi there,
>
> I have a form that can be either in „edit“ or „view“ mode. To toggle this, I simply call form.setEnabled(true|false), which works fine.
>
> Now, I have some ajax links inside that form that should be enabled although the form itself is disabled. Yet, I found no way to achieve this, is that doable somehow?
>
> Cheers,
>     Tom
>
>
> ---------------------------------------------------------------------
> 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