[
https://jira.jboss.org/jira/browse/RF-4209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrei Markavtsov resolved RF-4209.
-----------------------------------
Resolution: Done
Assignee: Tsikhon Kuprevich (was: Andrei Markavtsov)
JS API methods added:
1. submitForm ()
Example:
page:
<h:form>
<rich:fileUpload fileUploadListener="#{bean.upload}"
uploadData="#{bean.data}"... />
</h:form>
<a href="#" onclick="return $('fileUploadId').component.submitForm()" .../>
java:
List<UploadItem> data ....
public void upload(UploadEvent e) {
List<UploadItem> list = e.getUploadItems();
}
Behavior: form will be submitted to server. All files added to list will be put
to model and event.
2. beforeSubmit()
Example:
<h:form>
<rich:fileUpload fileUploadListener="#{bean.upload}"
uploadData="#{bean.data}"... />
</h:form>
<h:commandButton onmousedown="return
$('fileUploadId').component.beforeSubmit()" ... action="another_page".../>
Behavior: form will submitted to server by command button. Files will be put to
model & event. Navigation will be applied according to action defined.
This method sets up necessary request parameters for file uploading. It does
NOT submit form. It should be used together with commands.
> File Upload: add possibility to upload files with form
> ------------------------------------------------------
>
> Key: RF-4209
> URL: https://jira.jboss.org/jira/browse/RF-4209
> Project: RichFaces
> Issue Type: Task
> Reporter: Andrei Markavtsov
> Assignee: Tsikhon Kuprevich
> Fix For: 3.2.2
>
>
> Add method to JS API that should set up all necessary params and submit form.
> Files added to list should be applyed to data modal and event.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues