Skip to main content

Posts

Showing posts with the label Taglib

How to create Pagination Taglib in Java, Spring

Points To Remember Bootstrap is one of the major UI componnet used worldwide, So you may want to implemnt pagination using bootstrap in java , j2ee or spring application. So all you need to do is Create a Class that will behave like a taglib. Create a Tld file that will map the tablib class with the jsp's. Use the taglib on jsp using the tld file. Create Pagination Taglib for Jsp with Bootstrap. Following is an example of the a custom taglib built for Bootstrap . This taglib takes in uri -> action to be hit when clicked. offset -> the offset of pagination. count -> total number of elements to be shown. max -> maximum number of pages to be shown in the pagination bar. steps -> maximum number of elements to be shown per page. previous -> text to be shown for previous page link. next -> text to be shown for next page link. PaginationTaglib.java This is a java class that will behave like a taglib on jsp's. package com.ekiras.taglib; import java.io.Writer...