Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem while creating RichFaces FileUpload component in Java code  RSS feed

Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I want to generate Richfaces FileUpload on server side by java code and bind it in page. But I am not able to set the action method which get called when user uploads file through FileUpload.

This is what I did in my code,

HtmlFileUpload artattribComponentType = new HtmlFileUpload();
// artattribComponentType.setAddControlLabel("Upload");

artattribComponentType.setValueExpression("altValue", altExpression);
//This is Important
MethodBinding action = FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{massProductOrderGrid.uploadListener(fileUpload_" + idCnt + "_" + attribCount + ")}", new Class[] {});

By above code I am able to display RichFileUpload on page.

In Rich File upload there is one FileuploadListener method which get called when we upload the Image with the parameter as UploadEvent, but when
I am building the FileUpload on server, how do I set the UploadEvent of the uploadedd file.

My question is how do I set the UploadEvent of uploaded image in my fileListener method. Form that event I can get the Information abt uploaded file

Can anyone please guide me here what am I doing wrong?
Am I missing something obvious here?

Thanks and appreciate your response...
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!