Hi I have a managed bean with some functions , based on some condition in that function I will like to call a dialog box
Managed bean function goes as
public String editStudent(){
setReadOnly(false);
setButton(true, true, true, false, true, true,true);
LockItem lItem;
if(selectStudent !=null){
lItem = (LockItem) services.getbyId("LockItem", condition);
if (lItem == null){
System.out.println("Student Avalibale for process :::");
studentRedirect();
return "studentEdit.jsf?faces-redirect=true";
} else {
//To show dialog from here
System.out.println("Student Not Avalibale : Locked By " + lItem.getLockedBy());
}
} else {
FacesMessage msg;
msg = new FacesMessage("Please select the record.");
FacesContext.getCurrentInstance().addMessage(null, msg);
return show("menu");
}
}
Is there any method using which we can call the dialog box from such managed function