I just created a quick start with 1.4.17 where I added my behavior to the single label created in the template page. This time in addition to the methods mentioned below also getStatelessHint gets called but still beforeRender etc are not called.

The label is still fully rendered. As Martin requested I created a JIRA issue for this with my quickstart attached. The issue can be found here https://issues.apache.org/jira/browse/WICKET-3854

Please let me know if that is sufficient or how I can provide more information.

Am 30.06.2011 19:04, schrieb Igor Vaynberg:
just a hunch, but if the component to which the behavior is attached
to is not visible then none of the methods like before/after render
will be called since component is not rendering.

-igor

On Thu, Jun 30, 2011 at 9:48 AM, Christian Huber<[email protected]>  wrote:
I tried adding a dummy implementation of that interface that logs every
method call to custom subclass of link. While the links get rendered
regularly the only methods that get invoked are isTemporary, bind, isEnabled
and detach. All other methods are never called, am I missing something here?


Am 30.06.2011 17:35, schrieb Igor Vaynberg:

mixin IComponentConfigurationBehavior (1.4.17+ i believe) and
implement visibility toggling in onconfigure(component) of your
behavior.

-igor

On Thu, Jun 30, 2011 at 7:03 AM, Christian Huber<[email protected]>
  wrote:

Hi all,

I wanted to use a Behavior to customize the components in my application
(Wicket 1.4.2) by modifying some properties in the behaviors beforeRender
method.

But I had to find that this method is never called, neither is
afterRender.
The other methods of the behavior are invoked but those are not suitable
for
my needs (can't modify visibilty e.g. because that yields an exception).

I found an bug entry about this problem and acording to the comments this
seems to be a conecptual problem and won't be fixed.

So I was wondering if there is a suitable alternative to be used instead
of
a behavior. For example I would like a component to decide for itself if
it
should be visible in the current context by evaluating stuff like login
status of the user or it's content.

Would be great if I could get some pointers on how to do this in a
sensible
way with wicket.

Cheers,
Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to