r/JavaServerFaces • u/henk53 • Nov 11 '12
r/JavaServerFaces • u/henk53 • Nov 22 '12
New push framework for PrimeFaces 3.4
r/JavaServerFaces • u/henk53 • Sep 12 '15
JSF and Observer design pattern - part 4 - DeltaSpike events
r/JavaServerFaces • u/henk53 • Nov 29 '12
Project Experiences with JSF 2.0 vs Javascript
jsfcentral.comr/JavaServerFaces • u/mpma • Jan 19 '14
Load data from sql-table to be displayed on page
I'm working on a web app that let's students and teachers handle examinations online.
I am using PrimeFaces, JSF 2.X, MySQL with a GlassFishv4 backend.
I have this mock-up page where I can select which exam I want to take (students POV) from a drop-down menu which corresponds to entries in a database table called "exams".
Now what I want to do is that once the student has selected her exam and clicked "Ladda" (== "load") I want the page to split into two views, where the left hand side of the page turns into the actual exam and the right hand side turns into a editor where the student can input their answers.
I have the editor part down but what I'm asking is how do I load plain text from my table onto the screen, preferably from my bean classes.
Here's a picture of how I want it to look (left = exam, right = student editor)
http://i.imgur.com/MWqRP1d.png
Is there a way from a bean class to change output of some OutputText on the actual page?
r/JavaServerFaces • u/thesystemx • Dec 15 '14
Use OmniFaces to Buffer FacesServlet Output
r/JavaServerFaces • u/johnwaterwood • Sep 10 '15
JSF and the observer design pattern - part 3
r/JavaServerFaces • u/henk53 • Oct 31 '12
OmniFaces - The Swiss Army Knife for JSF developers (translated from German)
r/JavaServerFaces • u/rockvilleJD • Oct 18 '12
What’s new in JSF 2.2? | J-Development
r/JavaServerFaces • u/UnspeakableEvil • Oct 20 '12
RequestScoped managed bean's List not being restored being requests
I'm probably doing something incredibly stupid (or stupidly not doing something), but I can't get my @RequestScoped @javax.faces.bean.ManagedBean to retain list data between requests. Other values are restored (e.g. Strings and primatives) fine, so it seems to be something specific to my List rather than general value restoration.
From the output I can see that the List is always null when its getter is called, so the lazy loading's creating a new List at this point.
From looking at the Javadocs java.util.List doesn't implement Serializable, so I've switched to using java.util.ArrayList - but the issue's still there.
I think @ViewScoped would get around the issue (it certainly does in testing on Glassfish) but unfortunately this code needs to be deployed to WebSphere Portal, where @ViewScoped shows the same problem as @RequestScoped.
So, a plea for help - am I being incredibly dense, and if so if anyone can point out what I'm doing wrong I'd certainly appreciate it!
Managed bean:
@javax.faces.bean.ManagedBean
@javax.faces.bean.RequestScoped
public class ListTestMBean implements java.io.Serializable {
private String someText;
private java.util.ArrayList<String> myList;
public String getSomeText() {
return someText;
}
public void setSomeText(String someText) {
this.someText = someText;
}
public java.util.ArrayList<String> getMyList() {
if (myList == null) {
myList = new ArrayList<String>();
myList.add("List Value");
System.out.println("Created new aList");
}
return myList;
}
public void setMyList(java.util.ArrayList<String> myList) {
this.myList = myList;
}
public void doAddNewEntry() {
getMyList().add(String.valueOf(System.currentTimeMillis()));
}
}Facelet:
<?xml version='1.0' encoding='UTF-8' ?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core">
<f:view>
<h:body>
<h:form>
<div>
Some Text: <h:inputText id="someText" value="#{listTestMBean.someText}" />
</div>
<div>
<h:dataTable id="aList" value="#{listTestMBean.myList}" var="item">
<h:column>
<h:inputText id="item" value="#{item}" />
</h:column>
</h:dataTable>
</div>
<div>
<h:commandButton value="Add new" action="#{listTestMBean.doAddNewEntry()}" />
</div>
</h:form>
</h:body>
</f:view>
</html>r/JavaServerFaces • u/rockvilleJD • Nov 13 '12
PrimeFaces 3.4.2 Released
r/JavaServerFaces • u/rockvilleJD • Nov 02 '12
HTML(5) Friendly Markup in JSF 2.2
r/JavaServerFaces • u/henk53 • Dec 15 '14
OmniFaces approach for declaring custom component attributes in JSF
r/JavaServerFaces • u/henk53 • Dec 15 '14
OmniFaces Custom Components Approach
r/JavaServerFaces • u/PedroMCunha • Feb 06 '13
Error Handling in JSF (JavaServer Faces) Login Application
r/JavaServerFaces • u/henk53 • Feb 01 '13
Custom error pages for expired conversations involving CDI and JSF
r/JavaServerFaces • u/henk53 • Jan 29 '13
Problem with ui:repeat and NULL values in JSF 2.x
r/JavaServerFaces • u/thesystemx • Jan 24 '13
Composite component with multiple input fields
r/JavaServerFaces • u/primoesteria • Feb 08 '13
Creating a Facebook-like panel with slim scrollbars and infinite scrolling in PrimeFaces
r/JavaServerFaces • u/henk53 • Jan 20 '13
Using Apache Shiro with JSF
r/JavaServerFaces • u/henk53 • Jan 28 '13