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 (c.getPage()!=null&&c.getPage() instanceof BaseTeamPage) {
final BaseTeamPage page= c.getPage();
long teamid=page.getteamid(); <==== from here on you have the team id so you can do whatever
hope it gets you started
-Igor
On 7/30/06, Mats Norén <[EMAIL PROTECTED]> wrote:
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 ordinary user
Every page in the application works in the same way.
In my other attempts with wicket and authorization I used an
AuthenticatedWebSession and annotations to filter the components but I
don't see how I can combine that with a page parameter?
Any ideas?
/Mats
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user