0

I'm trying to run the Chat like in the Mobile Chat Example with the sourcecode:

here: http://code.google.com/p/primefaces/source/browse/examples/trunk/showcase/src/main/webapp/mobile/chat.xhtml http://code.google.com/p/primefaces/source/browse/examples/trunk/showcase/src/main/java/org/primefaces/examples/view/ChatView.java?r=7770 https://code.google.com/p/primefaces/source/browse/examples/trunk/showcase/src/main/java/org/primefaces/examples/view/ChatUsers.java?spec=svn7780&r=7770

Now to my problem: The whole think deploy and run well but if i want to insert a username and click on "Login" the ajax-loader.gif come up and then nothing happens i never come to the Chat. I found out that i get this response:

Error:

<?xml version='1.0' encoding='UTF-8'?>
<partial-response><error><error-name>class javax.el.PropertyNotFoundException</error-name><error-message><![CDATA[/index.xhtml @46,87 value="#{chatView.username}": Target Unreachable, identifier 'chatView' resolved to null]]></error-message></error></partial-response>

Where did i go wrong? please help..

BTW: I'm using Primefaces 3.4 and Glassfish 1.3.2 with enabled Websocket!

4

2 回答 2

1

You need to annotate the ChatView class with @ManagedBean. Strangely the class isn't already.

@ManagedBean
@ViewScoped
public class ChatView {
....
于 2012-09-13T05:08:32.043 回答
0

The problem was that I forgot to add some libraries.

Solution: Make a complete checkout of the repository from Primefaces and it will run like on the showcase. Somehow simply coping smaller parts of it doesn't work like expected.

# Non-members may check out a read-only working copy anonymously over HTTP.
svn checkout http://primefaces.googlecode.com/svn/primefaces/trunk/ primefaces-read-only
于 2013-05-04T10:20:01.853 回答