Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- final class MyController(TView) : Controller!TView
- {
- this(TView view)
- {
- super(view);
- }
- @HttpDefault Status defaultAction()
- {
- //default view is 'default'
- if(condition == true) {
- view = view.view("someotherview");
- // if you needed to use it:
- auto someotherview = cast(view_someotherview)view;
- // If the name of the view can be interfered at compile-time you can replace above with:
- auto someotherview = view.viewRaw!"someotherview";
- view = someotherview;
- // ...
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement