Java examples for JSF:HtmlInputHidden
convert To Int from JSF Html Input Hidden
import java.text.MessageFormat; import java.util.Locale; import java.util.ResourceBundle; import javax.faces.component.html.HtmlInputHidden; public class Main{ public static Integer convertToInt(HtmlInputHidden hi) { String str = null;/*from w w w . ja v a 2 s.c o m*/ if (hi != null) { str = (String) hi.getValue(); } if (str != null && !str.trim().equals("")) { return Integer.parseInt(str); } return null; } }