jsf-2

java.io.FileNotFoundException when file is in folder

时光总嘲笑我的痴心妄想 提交于 2019-12-12 04:14:17
问题 I have created project using JF 2.0. When I run project, I can execute file xyz.xhtml by saying http://localhost:8080/myProject/faces/xyz.xhtml However when I put the same in in folder xyz and try to execute as http://localhost:8080/myProject/faces/xyz/xyz.xhtml I get exception as java.io.FileNotFoundException . First few lines of stacktrace are java.io.FileNotFoundException at org.apache.naming.resources.DirContextURLConnection.getInputStream(DirContextURLConnection.java:403) at com.sun

Pages restricted by login filter are still accessible by other users

杀马特。学长 韩版系。学妹 提交于 2019-12-12 04:13:04
问题 I am using Filters in my login application. I want some pages only accessed by admin. I have kept those pages in admin folder and implemented filters in my project. But pages are still accessible through URL by other users. Where I am going wrong? import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import

Primefaces 3.0 DataTable inCell editing , RowEditEvent doesn't retrieve updated field

﹥>﹥吖頭↗ 提交于 2019-12-12 04:09:26
问题 I am working on a sample app with primefaces 3 , using datatables incell editing mode. Although when i edit , i see the event.getObjects gives me the object which is not modified. Changed the property of the object on debug mode, it does update. So i couldn't figure out why i cant get the edited property. Below are my eventlistener method and the xhtml; Any pointers are welcomed Thanks in advance EventListener public void editListener(RowEditEvent event){ System.out.println("EDIT LISTENER");

jsf2 search bean request scope is not displaying results

蹲街弑〆低调 提交于 2019-12-12 04:09:16
问题 Here is my code, search.xhtml page <h:form id="searchform"> <h:inputText id="deptId" value="#{searchBean.departmentId}"></h:inputText> <h:inputText id="deptName" value="#{searchBean.deparmentName}"></h:inputText> <h:commandButton value="Click to Search" action="#{searchBean.searchEmployees}"> </h:commandButton> </h:form> searchresults.xhtml page <rich:dataTable value="#{searchBean.employeeList}" var="e" id="table"> <rich:column> <f:facet name="header"> <h:outputText value="FNAME"/> </f:facet>

f:ajax listener never fired

筅森魡賤 提交于 2019-12-12 04:04:31
问题 i'm using JSF 2.0 primefaces 2.2 and Spring 3.0.5. I have a little problem usign f:ajax listener that wasn't fired. This is the code: <h:form prependId="false" > <h:selectOneRadio value="#{autoBean.newAuto.marca}"> <f:selectItem itemValue="aa"/> <f:selectItem itemValue="bb"/> <f:ajax event="click" listener="#{autoBean.update}" /> </h:selectOneRadio> </h:form> and this is the method: public void update(AjaxBehaviorEvent event) { } any idea? Thank you in advance UPDATE Sorry, but the problem

Servlet 3.0 doesn't load on application startup

天大地大妈咪最大 提交于 2019-12-12 03:57:35
问题 I've a JSF 2.0 web application running in tomcat 7.0.29 and tried to use the Servlet 3.0 annotation but the servlet didn't work as i can't see the log written in its init() method. i ve read many answers for the same problem but still not seccessful. This how my files look: The web.xml : <?xml version="1.0" encoding="UTF-8"?> <web-app metadata-complete="false" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun

viewParam event going wrong

旧时模样 提交于 2019-12-12 03:56:56
问题 I created a webpage, which checks the view-parameter from the URL, and calls the init-method of a bean to retrieve that user. The fields on that page are then filled with the information of that user. But something is going wrong. My Facelets page: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"

Draggable rows in primefaces datatable - a way to save the order of the table?

╄→尐↘猪︶ㄣ 提交于 2019-12-12 03:56:49
问题 I am trying to implement draggable rows on a datatable in primefaces. I know that Primefaces has draggable rows in a datatable "planned for a future release". I am currently trying to find some way to implement this functionality myself. I used the following bit of jquery code to make the rows draggable $(".ui-datatable.sortable tbody").sortable(); However, this does not save the order of the rows once you leave the page. I have a button that gets pressed to save the table, and I am trying to

How to add ajax validation to programmatically generated primefaces component

不问归期 提交于 2019-12-12 03:56:34
问题 I am trying to attach normal bean validation to the blur event on a programmatically generated Primefaces UIComponent. If I manually create the component using xhtml, which works fine, it looks like this: <p:inputText id="customerName" value="#{editCustomerBean.name}" label="Name"> <p:ajax async="true" event="blur" update="customerName, customerNameMsg" /> </p:inputText> Unfortunately I need to generate this component on the fly because of some dynamic attributes that will be populated based

JSF2.0 State_Saving_Method client issues

允我心安 提交于 2019-12-12 03:56:31
问题 Im using Mojarra 2.1.3, Netbeans 7.0.1, primefaces 3.2. I am currently in a quandary whether to use STATE_SAVING_METHOD client or server. Currently Im setting the saving method to client. And this involves me doing adjustment to seriazibility of many objects. And putting transient keyword on the stateless facade session beans. @ManagedBean @ViewScoped public class SaProductController implements Serializable { @EJB transient SaProductFacade saProductFacade; @EJB transient SaKeywordFacade