On 7/18/07, Maurice Marrink <[EMAIL PROTECTED]> wrote:
> True you can't do setModel(foo) and expect your instantiation check to
> work. Which imho is perfectly logical if you want to use your model in
> the instantiation check you need to pass it in the constructor.
>
> As for the example
> We have a search page for students, uppon clicking on one of those
> students, you go to a detail page for that student. that page also
> contains several tabs to go to other relevant pages for the student
> (like it's school grades). on these pages we made a quicksearch
> function with contains amongst other things 2 buttons to navigate
> forth and back between the searchresults of the search page, while
> keeping the same view. Suppose i have sufficient rights to see the
> detail pages of all students but only enough rights to see the grades
> of my own students.
>
> So if i make the search wide enough to get all students and then
> select one of my own, going to the grades. That's fine. But if i then
> navigate to another student i am not allowed to see the grades
> (creating a new instance of the grades page in the process) i need to
> know if the page in combination with the student is allowed, because
> the page itself is basically allowed.

Sounds to me like you have alternative ways to implement this, for
instance, construct what's on your page according to what can be
displayed, throw an auth exception in the page itself (doesn't sound
like you were doing this generically to start with?) or use an
intermediate page that functions like a switch. Also, if you really
want to follow your approach and IComponentInstantiationListener is
not rich enough, consider using AOP, which should give you all the
freedom you wish for.

Eelco

-------------------------------------------------------------------------
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

Reply via email to