protected int getNextId ( ServletRequest req ) { Integer i = ( Integer ) RequestUtils . getOuterAttribute ( ( HttpServletRequest ) req , NETUI_UNIQUE_CNT ) ; if ( i == null ) { i = new Integer ( 0 ) ; } int ret = i . intValue ( ) ; RequestUtils . setOuterAttribute ( ( HttpServletRequest ) req , NETUI_UNIQUE_CNT , new Integer ( ret + 1 ) ) ; return ret ; }
This method will generate the next unique int within the HTML tag .