private void checkNavigationMenuState ( final HttpServletRequest req ) { if ( req == null ) return ; if ( req . getSession ( ) . getAttribute ( ATTR_IS_NAV_MENU_COLLAPSED ) != null ) return ; // here we can specify default collapse value req . getSession ( ) . setAttribute ( ATTR_IS_NAV_MENU_COLLAPSED , false ) ; }
Check if navigation menu default state present in request . If there is no state set default value .