M
Moiristo
Hi, I need your help again with this one.
I want to be able to upload a document (plain text) together with a name
and description. I've created the following jsf fragment for this:
<h:form id="createForm">
<table>
<tr>
<td><h
utputText value="#{labels.name}"/>: </td>
<td><h:inputText id="name" value="#{Bean.name}" /></td>
</tr>
<tr>
<td><h
utputText value="#{labels.desc}"/>: </td>
<td><h:inputTextarea id="description"
value="#{Bean.description}" /> </td>
</tr>
</table>
<h3><h
utputText value="#{labels.data}"/></h3>
<h:form enctype="multipart/form-data">
<t:inputFileUpload value="#{Bean.data}"/>
</h:form>
</p>
<h:commandButton action="#{Uploader.uploadData}"
value="#{labels.send}" />
</h:form>
This does not work though. When I submit, nothing happens. I think there
is a problem with the nested multipart form, but I'm also not sure
whether the Tomahawk inputFileUpload tag will store the data in
Bean.data (byte[]).
I'd like to ask for this information all on one page. Is it for example
possible to split the forms have them both submitted with one
commandbutton? Any other ideas?
I want to be able to upload a document (plain text) together with a name
and description. I've created the following jsf fragment for this:
<h:form id="createForm">
<table>
<tr>
<td><h
<td><h:inputText id="name" value="#{Bean.name}" /></td>
</tr>
<tr>
<td><h
<td><h:inputTextarea id="description"
value="#{Bean.description}" /> </td>
</tr>
</table>
<h3><h
<h:form enctype="multipart/form-data">
<t:inputFileUpload value="#{Bean.data}"/>
</h:form>
</p>
<h:commandButton action="#{Uploader.uploadData}"
value="#{labels.send}" />
</h:form>
This does not work though. When I submit, nothing happens. I think there
is a problem with the nested multipart form, but I'm also not sure
whether the Tomahawk inputFileUpload tag will store the data in
Bean.data (byte[]).
I'd like to ask for this information all on one page. Is it for example
possible to split the forms have them both submitted with one
commandbutton? Any other ideas?