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.