Re: [Wicket-user] Is it possible to set visibility in an IBehavior (in 1.3.0 trunk)?

2007-06-19 Thread Al Maw
Timo Rantalaiho wrote:
> Visiting all relevant components (e.g. marked with an 
> interface) from a parent might be possible too.

Beware http://issues.apache.org/jira/browse/WICKET-627 if you go down 
that route.

Al

-- 
Alastair Maw
Wicket-biased blog at http://herebebeasties.com

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Is it possible to set visibility in an IBehavior (in 1.3.0 trunk)?

2007-06-19 Thread Maurice Marrink
This sounds more like a security issue than a behavior issue. I expect
you can use any security framework for wicket (Swarm, Auth-Roles,
someone is working on integrating Acegi) to do this. but off course I
would suggest Swarm :) In this particular case it could be as easy as
using for instance the SecureTextField and defining the proper
principals for your usergroups.

You can find more about Swarm here
http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Security

Maurice

On 6/19/07, Timo Rantalaiho <[EMAIL PROTECTED]> wrote:
> Hello Wicket,
>
> We have to hide a couple of components from certain groups
> of users. We tried doing it with a reusable AbstractBehavior,
> but calling component.setVisible() in IBehavior.beforeRender()
> caused the good old "cannot modify component hierarchy
> during render phase" exception. There is no onBeforeRender()
> in IBehavior.
>
> Should it be possible for an IBehavior to control visibility
> (Component.isVisible(), not just HTML or CSS attributes)?
>
> The code (calling same code in all relevant isVisible()
> methods()) works, but it would be interesting to know if
> there would be a more elegant or reusable solution.
>
> We develop on 1.3.0 trunk.
>
>
> Visiting all relevant components (e.g. marked with an
> interface) from a parent might be possible too.
>
> Thanks,
> Timo
>
> --
> Timo Rantalaiho
> Reaktor Innovations Oyhttp://www.ri.fi/ >
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Is it possible to set visibility in an IBehavior (in 1.3.0 trunk)?

2007-06-18 Thread Timo Rantalaiho
Hello Wicket,

We have to hide a couple of components from certain groups 
of users. We tried doing it with a reusable AbstractBehavior, 
but calling component.setVisible() in IBehavior.beforeRender()
caused the good old "cannot modify component hierarchy 
during render phase" exception. There is no onBeforeRender() 
in IBehavior.

Should it be possible for an IBehavior to control visibility
(Component.isVisible(), not just HTML or CSS attributes)?

The code (calling same code in all relevant isVisible() 
methods()) works, but it would be interesting to know if 
there would be a more elegant or reusable solution.

We develop on 1.3.0 trunk.


Visiting all relevant components (e.g. marked with an 
interface) from a parent might be possible too.

Thanks,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations Oyhttp://www.ri.fi/ >

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user