3.0M3 Simple File Upload

UI Components for JSF
Post Reply
quoobik
Posts: 1
Joined: 19 Aug 2011, 13:00

21 Aug 2011, 20:46

Hi,

I'm Java developer and noticed PrimeFaces - lightweight open source component suite for Java Server Faces 2.0.

Trying to learn much about JSF --> I started using primefaces in my home-grown JSF-devel-improveMyself-process. But I found problem. In general it's my problem, but in future it can be considered as problem of all developers trying to produce compact upload formular, same as my :

<form ...multipart/form-data ...>
<input type="text" id="t1">
<input type="text" id="t2">
<input type="text" id="t3">

<input type="file" id="f1">
<input type="file" id="f2">
<input type="file" id="f3">

</form>

In current latest stable version 2.2.1 I found the FileUpload component here: http://www.primefaces.org/showcase/ui/f ... adHome.jsf

The problem is - as you can see in html code aboive, I need from client to send me compact id data set to server side. Except of classic text fields rendered as <input type="text"> there are also few (not only one!) <input type="file" id="xx.."> elements. All of these elements must be sent JUST ONCE when the client clicks the submit button and on server side I have to detect identifier of each uploaded file to handle it in right way.

It's easy to implement it as classic JSP+servlet server side handling. Ok I've got it. But later I realized myself it would be fine to learn how to use L10n and i18n (see http://www.mkyong.com/jsf2/jsf-2-intern ... n-example/) --> BUT IT DETERMINES USAGE OF JSF PRINCIPLES!!!!!! So I found PrimeFaces and went to use FileUpload component. But than I realized it's not possible to build one compact <form> element containig text and file upload elements and invoke one upload event on appropriate bean (the server side) using platform version 2.2.1

So I continue:
- reading source code updates - found be blog: http://code.google.com/p/primefaces/iss ... ells=tiles
- reading blog and finally found showcase-labs: http://www.primefaces.org/showcase-labs ... adHome.jsf (I see there it's Running PrimeFaces-3.0.M3-SNAPSHOT on Mojarra-2.1.2)

The positive for me: I see there Basic Upload model - yesssssssssss!!! But I'd like to ask: Will this Basic upload model be deployed in next platform version?


Thanks for response and your time.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 66 guests