[Wicket-user] Authorization-question

2006-07-30 Thread Mats Norén
Hi, I've got a scenario where I would like to filter rendering of components based on a users role but the roles change depending on a page parameter, ie: - PageA has a page parameter teamId - if the teamId is 1 the User is admin (for that particular team) - if the teamId is 2 the User is an

Re: [Wicket-user] Authorization-question

2006-07-30 Thread Igor Vaynberg
here is some pseudo code:class BaseTeamPage extends Webpage { private final long teamid; public long getteamid() { return teamid; } public BaseTeamPage(long teamid) { this.teamid=teamid ; }}isactionallowed(Component c, Action act) { if (act==Component.VISIBLE) { if

Re: [Wicket-user] Authorization-question

2006-07-30 Thread Mats Norén
Ah, neat. OO to the rescue :) On 7/31/06, Igor Vaynberg [EMAIL PROTECTED] wrote: here is some pseudo code: class BaseTeamPage extends Webpage { private final long teamid; public long getteamid() { return teamid; } public BaseTeamPage(long teamid) {

Re: [Wicket-user] Authorization-question

2006-07-30 Thread Igor Vaynberg
i wouldnt recommend doint this in session because user entity will become detached, i would instead do it in the requestcycle so the user is loaded once per request((MyRequestCycle)RequestCycle.get()).getUser(); MyRequestCycle { private transient User user; getuser() { if (user==null) {

[Wicket-user] AJaxTabbedPanel and AjaxSelfUpdatingTimerBehavior

2006-07-30 Thread Lorin Metzger
Hi, I noticed when I added a Behavior (i.e. AjaxSelfUpdatingTimerBehavior) to my components in a Panel that was then added as a tab to the AjaxTabbedPanel, that the javascript was not added to resulting markup, when the tab containing my Panel was selected. I understand why this is, since