Ignore:
Timestamp:
03/26/12 17:00:15 (12 years ago)
Author:
rboipsl
Message:

ajout anotations
usermandatory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tapas/web/src/com/ether/ControllerEther.java

    r423 r440  
    120120            final String defaultView = ( null != methodDescription.getDefaultView() && !"".equals( methodDescription.getDefaultView() ) ) ? methodDescription.getDefaultView() : methodDescription.getView(); 
    121121 
     122 
    122123            if( methodDescription.isRequestMandatory() ) 
    123                 params[params.length - 1] = request; 
     124                params[params.length - 1] = request; //params = parametre de la methode du Controller 
     125 
    124126 
    125127            if( methodDescription.isLoginMandatory() ) 
     
    128130                if( null == user ) 
    129131                    return new ModelAndView( defaultView, "errors", "login.error.unknown" ); 
     132            } 
     133 
     134            if (methodDescription.isUserMandatory()) { 
     135                final User user = (User) request.getSession().getAttribute( "SES_USER" ); 
     136 
     137                if( null == user ) 
     138                    return new ModelAndView( defaultView, "errors", "login.error.unknown" ); 
     139                else 
     140                    params[params.length - 1] = user; 
     141 
    130142            } 
    131143 
Note: See TracChangeset for help on using the changeset viewer.