Iterate System Properties
Properties implements Map. (Reference http://docs.oracle.com/javase/6/docs/api/java/util/Properties.html) So you can iterate like for(String key : properties.stringPropertyNames()) {...
View ArticleSetting the value for jsf InputSecret during page load
The <h:inputSecret> doesn’t passwords by default due to security reasons. Use the following code to display password. <h:inputSecret value=”#{beanName.password}” redisplay=”true” />
View ArticleSelect by Value in ComboBox (C#)
Use the following code to select Combobox value. combobox.SelectedItem = value;
View Articlecan not find the tag library descriptor for http //java.sun.com/jsp/jstl/core
You get that error for the missing tld when standard.jar and jstl.jar are not found. If you are using maven, adding the following should fix it. <dependency>...
View ArticleRemove the last character of a string in JavaScript
var mystr = ‘Hello World!’; mystr = mystr.substring(0, mystr.length-1);
View ArticleDisplay a java.util.Calendar object in JSF
Use Calendar’s getTime() method which returns a Date. Then you can use <f:convertDateTime> <h:outputText value=”#{bean.startdate.time}” > < f:convertDateTime pattern=”yyyy-MM-dd...
View Article