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 - No comments
Get appplication from FacesContext
FacesContext ctx = FacesContext.getCurrentInstance();
Application app = ctx.getApplication();
Setting in Managed Bean Object
app.createValueBinding(“#appSessionBean.userDataBean}”).setValue(ctx, userDataBean);
Getting Managed Bean Object(s)
AppSessionBean appSessionBean = (AppSessionBean)app.createValueBinding(“#{appSessionBean}”).getValue(ctx);
userDataBean = (UserDataBean)appSessionBean.getUserDataBean();
where userDataBean is object in ApplicationSessionBean class and this said class is in faces-config with session scope.
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 - 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/
about 2 years ago
Hi,
and thank you very much!
This works really fine! Just to mention, each control on the form is a container for inside controls; this means:
if you have some checkboxes inside a table column, you’ll have to point to the first Checkbox as:
form1:dataTable1:0:Select
and so forth…
Thanks again!
about 2 years ago
Dear,
thanks for this nice blog please keep on
actullay i’m anewbie in jsf
i want asample code to datatable which can add,delete,update and edit
could you please send me this one
my mail
eng_essamzizo@hotmail.com
Thanks
about 7 months ago
Thanks ,
Thumbs up.
about 3 months ago
You can also try PrettyFaces — bookmarkable pages and also lets you call actions when pages are accessed via GET (http://ocpsoft.com/prettyfaces)