Skip to main content

Posts

Showing posts with the label Bootstrap

Spring Boot : How to create a Bootstrap class

Points To Remember In order to create a class that acts like a bootstrap for the application, that class needs to implement the InitializingBean of the package org.springframework.beans.factory.InitializingBean How to create a Bootstrap class in spring boot application Following is an example of a Bootstrap class. This class will be executed first when the application is coming up and is ready to server requests. Any class that implements InitializingBean will be executed before the application is up and its afterPropertiesSet method will be called. public class Bootstrap implements InitializingBean

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...