Hi,

> Ralf, nice to see you are still busy even after such a busy week :)
well it rained at that time in Antwerp so I could not walk around the
city... Second choice was playing around with Wicket a bit in my hotel
room :)

>         if (getAutoEnable())
>         {
>             // the link is enabled if this link doesn't link to the current
> page
>             boolean versionEnabled = isVersioned();
>             setVersioned(false);
>             setEnabled(!linksTo(getPage()));
>             setVersioned(versionEnabled);
>         }
Couldn't this be done by overriding the isEnabled() method with
something like (enabled && autoEnabled) so you don't need to care
about versioning at all?

> this is a bit harder. How do i get a page instance for a attribute modifier?
> Then we should record all the IBehaviour.bind(component) methods in
> AttributeModifiers..
> And then it can get fuzzy anyway, because what would happen if you reuse a
> behaviour acros pages?
> Should then every page be suddenly versioned? Even if they are in the
> pagemap and not active?
> I think we should enforce this in the API itself. Or make it clear that you
> can bind only once?
> If for example a developers reuses a Behavior across pages. Then ALL the
> pages will be kept in memory
> because the behaviour will have a reference to it.
Well, I'm also not sure about this one. I think that
enabling/disabling behaviour would make pretty much sense, I even
wanted to do this with AttributeModifier in one of my apps (like: add
class x but only if y). If I got it right offering only a isVisible()
method for overriding would get the problem away because then the
value is determined dynamically so no versioning needs to be done. But
then you couldn't disable a behaviour from f.e. a onClick handler
without throwing the same problem on the developer again...
I think behaviour should be able to participate in versioning, because
I think there are situations where they could have versionable
properties (don't have an example for this currently). Maybe
disallowing behaviours used across multiple pages would fix the
problem? (I don't see cases where this would be needed and it
shouldn't be very hard to catch this at runtime)

Ralf


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to