Hi,

I think it is possible to do that for links.
You'll need to override
org.apache.wicket.markup.html.link.AbstractLink#isLinkEnabled() and
org.apache.wicket.Component#canCallListenerInterface(Method)

The first is needed to not render the link as disabled. The second is
needed to be able to actually execute the links logic.

The second method is added in 1.5.x.

On Wed, May 9, 2012 at 1:47 PM, Jürgen Lind <juergen.l...@iteratec.de> wrote:
> Hi Martin,
>
> that was my initial approach. However, I would like the collapsible panels
> to keep their
> state between form submits, therefore I would need some sort of Javascript
> state management
> or I would simply use ajax links for that purpose. Which is what I would
> prefer... A later
> post already mentioned that this wont be too easy, so maybe I will have to
> go back to JS...
>
> J.
>
>
> On 09.05.2012 11:16, Martin Grigorov wrote:
>>
>> Hi,
>>
>> Why don't use plain Javascript for this. It will be faster because it
>> wont make roundtrip to the server and wont be disabled as a Wicket
>> component ?
>>
>> On Wed, May 9, 2012 at 12:06 PM, Jürgen Lind<juergen.l...@iteratec.de>
>>  wrote:
>>>
>>> Hi,
>>>
>>> I have a little problem in my application and maybe someone has an idea
>>> how
>>> to solve it:
>>> I have a complex form that is structured using a custom collapsible
>>> AJAX-panel to show/hide
>>> certain parts of the form. Now, if a user does not have the write
>>> permission
>>> for the form, the
>>> form is disabled and therefore all input elements as well (which is
>>> good).
>>> However, for
>>> obvious reaons, I would like the collapsible panels to remain enabled.
>>> How
>>> could I achieve
>>> this? I have already tried to have the ajax-link for the panel to always
>>> return true from
>>> isEnabled, but that seems to be overriden by the parent component. Any
>>> ideas
>>> where to look?
>>>
>>> Cheers,
>>>
>>> Jürgen
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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

Reply via email to