about 2 years ago - No comments
A post was made on Javalobby in the response of Rick Hightower observation on fastest growing frameworks. According to graph it is clear that there are more jobs of JSF and its demand is increasing as compared to other web frameworks.
Luckily I got chance to work on JSF in my previous job, and I really More >
about 2 years ago - 3 comments
Javascript to Select One Radio Button
function selectOne(form, button) {
turnOffRadioForForm(form);
button.checked = true;
}
function turnOffRadioForForm(form) {
for (var i = 0; i < form.elements.length; i++) {
form.elements[i].checked = false;
}
}
JSF Code of h:dataTable Table on JSP Page
We will use valueChangeListener for this, as when user check the radio button we will get the binded value of bean. It is one column. More >
about 2 years ago - 3 comments
import javax.faces.context.FacesContext;
public void addInSession() {
MySession mySession = new MySession();
mySession.setName(getMsg());
/* .getSession(boolean), true if we want to create new session, if want touse oldsession then false*/
FacesContext context = FacesContext.getCurrentInstance();
HttpSession session = (HttpSession) context.getExternalContext().getSession(false);
session.setAttribute("sessionObj", mySession);
if (session.getAttribute("sessionObj") != null) {
MySession mySavedSession = (MySession) session.getAttribute("sessionObj");
System.out.println("HTTP Session: " + mySavedSession.getName());
} else {
// do something
}
}
about 2 years ago - 4 comments
Here is the way, how we get request parameters from a JSP page (which is JSF enabled) in a HTTP request object.
import javax.faces.context.FacesContext;
//…your code
HttpServletRequest request = (HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();
String controlName = request.getParameter("formId:controlId");
Where formName is refer to the id of your form and controlId is referred to the id of your control.
about 2 years ago - No comments
Faces Console is a free utility get integrated in many IDEs as plugin and provide JSF (faces-config.xml) configuration facility in a GUI. if you are using NetBeans5.0 or Eclipse3.x you must try it.
http://www.jamesholmes.com/JavaServerFaces/console/