• Post Reply Bookmark Topic Watch Topic
  • New Topic

File upload problem : urgent  RSS feed

 
Anks Gupta
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am implementing file upload feature using tomahawk library along with facelets. <h:inputFileUpload>

I need to set enctype in <h:form> to "multipart/form-data" but i cannot do that because my this page(page 1) gets embedded in another page(page2) using ui:include.

This page 2 is a general page and all forms in whole app gets included in this page. So in <h:form> tag of this page i cannot set enctype because many other pages are included in this page, so it starts giving error.

And offcourse I cannot have h:form tag in my current page (page 1) because this will lead to form embedded in another form at runtime.

So i am trying to set the form enctype programaticaaly by using something like form.setEnctype("multipart/form-data") but dont know how to access the current form programatically using lets say faces context.

Can somebody please help me with this solution?

Any other solutions are welcome.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why did you add 'urgent' to the topic title? That's your own problem, not ours. Why are you moving the pressure to us? My motivation to help you has been disappeared.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!