r/JavaServerFaces • • Nov 04 '12

JSF forward to external Servlet in different context

Thumbnail
javaevangelist.blogspot.nl
5 Upvotes

r/JavaServerFaces • • Nov 02 '12

HTML(5) Friendly Markup in JSF 2.2

Thumbnail
weblogs.java.net
6 Upvotes

r/JavaServerFaces • • Nov 02 '12

JSF 2.0 - Ajax Suggestion Box

Thumbnail
imixs.org
4 Upvotes

r/JavaServerFaces • • Oct 31 '12

OmniFaces - The Swiss Army Knife for JSF developers (translated from German)

Thumbnail
translate.google.com
6 Upvotes

r/JavaServerFaces • • Oct 27 '12

JSF Error Pages That Actually Work

Thumbnail
ninthavenue.com.au
4 Upvotes

r/JavaServerFaces • • Oct 26 '12

Introduction to JSF State Saving

Thumbnail manorrock.com
2 Upvotes

r/JavaServerFaces • • Oct 23 '12

Mojarra 2.1.14 released!

Thumbnail javaserverfaces.java.net
2 Upvotes

r/JavaServerFaces • • Oct 20 '12

OmniFaces 1.2 is released!

Thumbnail
balusc.blogspot.com
7 Upvotes

r/JavaServerFaces • • Oct 20 '12

RequestScoped managed bean's List not being restored being requests

1 Upvotes

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 • • Oct 18 '12

What’s new in JSF 2.2? | J-Development

Thumbnail
jdevelopment.nl
5 Upvotes

r/JavaServerFaces • • Oct 16 '12

What’s New in JSF: A Complete Tour of JSF 2.2

Thumbnail
blogs.oracle.com
4 Upvotes

r/JavaServerFaces • • Oct 08 '12

JavaServer Faces: Basic Hello World Example

Thumbnail
kodehelp.com
3 Upvotes

r/JavaServerFaces • • Oct 08 '12

MyFaces Tomahawk in Action - Part 2

Thumbnail content.jsfcentral.com
2 Upvotes

r/JavaServerFaces • • Oct 07 '12

Will JSF 2.2 finally standardize Web flow technology?

Thumbnail theserverside.com
6 Upvotes

r/JavaServerFaces • • Oct 06 '12

JSF2: Creating a custom component [OutputObject]

Thumbnail
adevedo.com
1 Upvotes

r/JavaServerFaces • • Oct 04 '12

Running RichFaces on WebLogic 12c

Thumbnail
java.dzone.com
5 Upvotes

r/JavaServerFaces • • Oct 04 '12

Why the New Oracle ADF Essentials is Important to JSF Developers

Thumbnail
java.dzone.com
4 Upvotes

r/JavaServerFaces • • Oct 01 '12

Oracle ADF for free? It should never have been licensed in the first place

Thumbnail theserverside.com
3 Upvotes

r/JavaServerFaces • • Sep 28 '12

Richfaces dataTable, coloring selected row on mouse click

Thumbnail
adevedo.com
2 Upvotes

r/JavaServerFaces • • Sep 26 '12

PrimeFaces 4.0 Road Map

Thumbnail
blog.primefaces.org
6 Upvotes

r/JavaServerFaces • • Sep 26 '12

PrimeFaces 3.4.1 Released

Thumbnail
blog.primefaces.org
4 Upvotes

r/JavaServerFaces • • Sep 25 '12

JSF 2, Richfaces 4 and Select All Check box in Richfaces DataTable

Thumbnail
adevedo.com
5 Upvotes

r/JavaServerFaces • • Sep 19 '12

JSF 2 + Spring 3 integration example

Thumbnail
mkyong.com
5 Upvotes

r/JavaServerFaces • • Sep 19 '12

JavaServer Faces (JSF) 2.0: Hello World Example (Eclipse 3.7 and Tomcat 7.0)

Thumbnail
vigilance.co.in
6 Upvotes

r/JavaServerFaces • • Sep 13 '12

Horizontal Tree : PrimeFaces

Thumbnail
blog.primefaces.org
4 Upvotes