JSF Input text placeholder

In the Tag description add the pt entry and its corresponding web address <html xmlns=”http://www.w3.org/1999/xhtml” xmlns:h=”http://java.sun.com/jsf/html” xmlns:pt=”http://xmlns.jcp.org/jsf/passthrough”> in the input text declaration <h:inputText styleClass=”form-control” pt:placeholder=”Enter Search Value” required=”true” requiredMessage=”Please enter search value” value=”#{orderController.keyword}” id=”keywordSearch”/>

Java XML Parser

Using Dom4J <dependency> <groupId>dom4j</groupId> <artifactId>dom4j</artifactId> <version>1.6.1</version> </dependency> XMLParser.java import org.apache.commons.lang.StringUtils; import org.dom4j.Document; import org.dom4j.DocumentHelper; import org.dom4j.io.OutputFormat; import org.dom4j.io.XMLWriter; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Document; import org.xml.sax.InputSource; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import java.io.StringReader; import java.io.StringWriter; import java.io.StringWriter; public class XMLFormatter { private static Logger

Resetting ID Sequence in PostgreSQL

— Latest Inserted ID SELECT MAX(IDFIELD) FROM TABLENAME; — The id that will be assigned to the upcoming data tulip. — The result shoult be Latest ID + 1 SELECT nextval(‘TABLENAME_ID_SEQ’); BEGIN; LOCK TABLE TABLENAME IN EXCLUSIVE MODE; SELECT setval(‘TABLENAME_ID_SEQ’, COALESCE((SELECT MAX(IDFIELD)+1 FROM TABLENAME), 1), false); COMMIT;