2010/3/9 Viet Nguyen <phamquocv...@gmail.com> > > >> Hi Viet, this looks quite elegant.. >> >> If the PagingUtil class is general, any chance we can move it to the >> dhis-support-system project so that it can be used by other modules if >> required later? >> >> Lars >> >> >> > Yeah, I can move the PageUtil class to dhis-support-system, paging.vm and > paging.css to common-resource. > > If I remember correctly...I think you also have a RequestUtil class > somewhere.... > > Actually, to get current request path I just call the method > request.getServletPath() , but I'm not sure it works for all modules... so > I put it in a util class, then later I can modify that link ( maybe add or > remove a "/" , or something like that.... ) > > -- > Viet Nguyen > > Sorry, I forgot to mention the javascript methods.
function changePageSize( baseLink ) { var pageSize = jQuery("#sizeOfPage").val(); window.location.href = baseLink +"pageSize=" + pageSize ; } function jumpToPage( baseLink ) { var pageSize = jQuery("#sizeOfPage").val(); var currentPage = jQuery("#jumpToPage").val(); window.location.href = baseLink +"pageSize=" + pageSize +"¤tPage=" +currentPage; } So I guess, this will have to be moved to common-resources... Should I create new file or put it in common.js ? -- Viet Nguyen
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp