jsf-2

How to sort a Column in a dataTable. JSF 2.0

核能气质少年 提交于 2019-12-13 13:37:10
问题 I'm building a WebApp in jsf 2.0 and it's about storing information and displaying it on the screen. so I've put in some "http://java.sun.com/jsf/html" dataTables to disply some lists. My Java code returns a List and then displays them on screen. but now I have to Sort the columns alphabetically. I believe there's no built in way of doing this, so i'm goign to have to look elsewhere for the task. I came across This dataTables example, it's pretty awesome but I think I can't give it a List and

Problem using Stateful EJB in ManagedBean with RequestScope

旧巷老猫 提交于 2019-12-13 13:33:19
问题 I'm using JSF 2.0 and EJB 3.1 in the Glassfish v3 app server. And I'm facing actually the follwing problem: In a MenagedBean with RequestScope I want to access a session object (an EJB with @Stateful) which should store some session relevant information as the seleced category, the seleced page (with a datatable paginator for each category), etc. - nothing special I think. The first time a category is selected, the datatable is created and displayed. Allright so far. Now, if an item (row) is

which jsf-impl should i use?

独自空忆成欢 提交于 2019-12-13 13:24:40
问题 Where can i find a jsf-impl for my jsf 2 webapp ? In maven's repo i got the 1.2 version. In the http://download.java.net/maven/2/javax/faces/, i can see only the jsf-api, but no jsf-impl Im currently using tomcat 7, and experimenting with primefaces. Thank you ! UPDATE I've been able to get both the api and the impl using this, but im still not sure which impl i should really use : <dependency> <groupId>com.sun.faces</groupId> <artifactId>jsf-api</artifactId> <version>2.0.3</version> <scope

Passing input text value with file upload in primefaces

好久不见. 提交于 2019-12-13 13:13:04
问题 I have the requirement that I have to pass the value of inputText to backing bean which will contain the version of the file along with the file upload. I have been trying to achieve it using remote command but not working. Below is my code: <h:form enctype="multipart/form-data" id="uploadForm"> <p:growl id="messages" showDetail="true" /> <p:outputLabel for="vers" value="File Version:" /> <p:inputText id="vers" name="vers" value="#{remoteDeployment.uploadedVersion}" placeholder="1.x.x.x"

javax.el.PropertyNotFoundException: /demo.xhtml @24,55 value=“#{UserBean.favYear3}”: Target Unreachable, identifier 'UserBean' resolved to null [duplicate]

余生长醉 提交于 2019-12-13 12:40:20
问题 This question already has answers here : Identifying and solving javax.el.PropertyNotFoundException: Target Unreachable (14 answers) Closed 3 years ago . I want to have a list box in JSF. I have written a simple code but it does not work. In demo page I see an empty box with out list and in user page I have error. UserBean.java @ManagedBean @SessionScoped public class UserBean implements Serializable{ public String favYear3;//list box public String getFavYear3() { return favYear3; } public

JBoss AS7 - Failed to process phase POST_MODULE of deployment

99封情书 提交于 2019-12-13 12:40:17
问题 Always when I deploy my project (jsf) I get the following error on my JBoss AS7. On JBoss 6 everything worked fine. What can be reasons for that error message? Do you have any idea how I can solve that? JBoss AS7-Console 21:25:17,026 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "myproject.war" 21:25:17,662 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.unit."seminarpla ner.war"

Getting Selected Row Data from Datatable in JSF

谁说我不能喝 提交于 2019-12-13 12:17:30
问题 So, I have tried to implement the methods from Anthony/BalusC in this question: How to get selected row index in JSF datatable? but to no avail. I also went through @BalusC's "Using datatables" article (which is wonderful as always) but that was written for JSF1.2 and the 2.0 article doesn't really address getting the selected row data. When a user clicks the "Add to my favorites" button, the selected row is not getting passed to the backing bean, the navigation case is not being followed,

JSF2.0 simple file input

。_饼干妹妹 提交于 2019-12-13 12:12:48
问题 I'm trying to add a very simple file input to my webapp which I'm doing using JSF2.0 and RichFaces 3.3.3, the thing is I really dislike the richfaces fileInput component and I'm looking for something simpler (in terms of use and looks), so far I've found: tomahawk's fileInput - but tomahawk only supports JSF1.2 trinidad fileInput - but trinidad for JSF2.0 is in alpha stage primefaces - but of course they won't work with RichFaces 3.3.3 (only 4.0 which are in beta) Are there any other options?

Primefaces Autocomplete from huge database not acting fast

此生再无相见时 提交于 2019-12-13 11:16:43
问题 I am using primefaces autocomplete component with pojos and which is filled from a database table with huge number of rows. When I select value from database which contains millions of entries ( SELECT synonym FROM synonyms WHERE synonym like '%:query%' ) it takes a very long time to find the word on autocomplete because of huge database entries on my table and it will be bigger in future. Is there any suggestions on making autocomplete acting fast. 回答1: Limiting the number of rows is a great

Why does my form isn't reseting his styling after render?

泪湿孤枕 提交于 2019-12-13 09:46:26
问题 I have a form with tree buttons on in. One of them is the "Cancel" button that goes back to the previous page. The problem is there is any validation issue, like a mandatory field not submited, the styling of the field is not reset when I go back to the form. This is a simplified structure of the xhtml: <panel id="horizontal"> <form id="filterVipLoungeForm"> </form> <form id="frmAddPax"> <form id="frmAccessType"> </form> </form> <panelGrid> <commandButton value="agregar" /> <commandButton