[jboss-user] [JBoss Tools (users)] - JBoss aren't getting the newest files
hvasoares
do-not-reply at jboss.com
Tue Jun 24 13:17:47 EDT 2008
I have, one class, this class has one proprerty: data. I'm writing this for uploading imagens.
Local interface
import javax.ejb.Local;
|
| @Local
| public interface Upload {
|
| //seam-gen method
| public void upload();
|
| public byte[] getData();
|
| public void setData(byte[] data);
|
| public void finalizar();
|
| //add additional interface methods here
| }
Class that implements the interface
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Logger;
| import org.jboss.seam.annotations.Destroy;
| import org.jboss.seam.annotations.Scope;
| import org.jboss.seam.ScopeType;
| import org.jboss.seam.log.Log;
| import org.jboss.seam.faces.FacesMessages;
| import javax.ejb.*;
|
| @Stateful
| @Name("upload")
| @Scope(ScopeType.SESSION)
| public class UploadBean implements Upload {
|
| @Logger private Log log;
|
| @In FacesMessages facesMessages;
|
| private byte[] data;
|
| public byte[] getData() {
| return data;
| }
|
| public void setData(byte[] data) {
| this.data = data;
| }
|
|
| public void upload()
| {
| //implement your business logic here
| log.info("upload.upload() action called");
| facesMessages.add("upload");
| }
|
| @Remove @Destroy
| public void finalizar(){
|
|
| }
| }
|
The lines are
| <h:form>
| <s:fileUpload data="#{upload.data}" accept="images/*"/>
| <h:commandButton action="#{upload.upload}" value="carregar"/>
| </h:form>
|
When I click on the comand button, an error happens:
javax.el.PropertyNotFoundException: /home.xhtml @28,43 value="#{upload.data}": Target Unreachable, identifier 'upload' resolved to null
Every change in the class or xhtml doesn't have any effects in the server, I've to restart the server many times before some changes go to the server.
Other time I get the same error and this error disappear mysteriously.
Anyone has an idea about this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160307#4160307
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160307
More information about the jboss-user
mailing list