Hi Marcus,

AFAIK, what you want cannot be done. The "upload file" functionality is
build upon the standard HTML <input type="file"> tag. Nothing can be
done by the JSF framework that the <input type="file"> tag does not
support. And this html tag does not provide any option to set the
starting directory.

As I'm sure you can understand, browsers must not allow html pages to
read stuff from the local disk unless the user explicitly agrees.
Anything else would be a huge security hole. So the only way for a page
to get files sent from the browser back to the server is via this one
<input type="file"> tag (unless you start using signed applets or
activeX or similar).

As you can see here
  http://w3schools.com/tags/att_input_type.asp
the <input type="file"> tag does support an "accept" attribute that will
filter what types of files will be displayed, but provides no way for
the html page to suggest a starting directory. There are no other
options for this html tag.

As Ali noted, the "dir" attribute on the t:inputFileUpload tag is
nothing to do with directory names; "dir" is short for "language
direction", ie supports languages like Arabic that are written
right-to-left as well as languages like English (left-to-right).

Regards,
Simon

m4rkuz schrieb:
> Sorry If I did not make myself clear,
>
> Let me explain further, I have a t:inputFileUpload that is represented
> as a input text and a button, when you click the button a dialog
> apears asking to select a file, what I want to do is to make this
> dialog opens a default dinamic folder on the disk, like when you an
> user click it it would open a dialog showing the default path for that
> user..
>
> Any ideas?
>
>
>
> Marcus V. Sánchez D.
> ______________________
> Enterprise Developer.
> Sun Certified Java Programmer (SCJP)
>
> PD: English is not my native language, help me a little ;)
>
>
> On Wed, Dec 17, 2008 at 4:48 AM, Ali Ok <al...@aliok.info
> <mailto:al...@aliok.info>> wrote:
>
>     Hi Marcus,
>
>     What do you mean "setting a default value in the dir attribute"?
>     Are you modifying tld file?
>     Do you mean you want to change text direction to RTL?
>
>     Regards,
>     Ali Ok
>
>     2008/12/16 m4rkuz <m4r...@gmail.com <mailto:m4r...@gmail.com>>
>
>
>         Hi everyone, I'm suscessfully using the t:inputFileUpload tag,
>         but now I have a problem setting a default value in the dir
>         attribute of the  Tag...
>
>         any Ideas?
>
>
>         Best Regards,
>
>
>         Marcus V. Sánchez D.
>         ______________________
>         Enterprise Developer.
>
>
>


-- 
-- Emails in "mixed" posting style will be ignored
-- (http://en.wikipedia.org/wiki/Posting_style)

Reply via email to