You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Madhav Bhargava <un...@gmail.com> on 2007/07/20 01:14:22 UTC

disable input text box generated from t:inputFileUpload

Hi All,

I have a requirement where the user should not be given control to directly
type in the path of a file. The user needs to necessarily click the browse
button and then the path will then be populated in the "disabled on client
side" input text that gets generated via this component.

I could only find one disabled property on that component but that does not
do the trick.

Do you have any suggestions?

Thanks,
Madhav

-- 
When I tell the truth, it is not for the sake of convincing those who do not
know it, but for the sake of defending those that do

RE: disable input text box generated from t:inputFileUpload

Posted by Madhav Bhargava <Ma...@infosys.com>.
Hi Andrew,
 
Thanks for the reply.Ideally we should have a feature similar to "disableOnClientSide" for t:inputFileUpload component. I am not sure about others but i feel that on many of the UI's the user is required to necessarily browse and not enter it manually to avoid user errors.
What you have suggested is a patch. I had tried implementing it but faced some problems.
 
Thanks,
Madhav

________________________________

From: Andrew Robinson [mailto:andrew.rw.robinson@gmail.com]
Sent: Fri 7/20/2007 6:41 AM
To: MyFaces Discussion
Subject: Re: disable input text box generated from t:inputFileUpload



input file is not stylable (IE lets you do a little). There are many
hacks out there to style it. Some involve putting an image over it,
and such. Just google for searches like "input file css style".

If you set the width small enough, the text box goes away. The problem
is that the font on the button can change per user and per browser
vendor, so it is near impossible to know how wide to make it.

On 7/19/07, Madhav Bhargava <un...@gmail.com> wrote:
> Hi All,
>
> I have a requirement where the user should not be given control to directly
> type in the path of a file. The user needs to necessarily click the browse
> button and then the path will then be populated in the "disabled on client
> side" input text that gets generated via this component.
>
> I could only find one disabled property on that component but that does not
> do the trick.
>
> Do you have any suggestions?
>
> Thanks,
> Madhav
>
> --
> When I tell the truth, it is not for the sake of convincing those who do not
> know it, but for the sake of defending those that do



Re: disable input text box generated from t:inputFileUpload

Posted by Andrew Robinson <an...@gmail.com>.
input file is not stylable (IE lets you do a little). There are many
hacks out there to style it. Some involve putting an image over it,
and such. Just google for searches like "input file css style".

If you set the width small enough, the text box goes away. The problem
is that the font on the button can change per user and per browser
vendor, so it is near impossible to know how wide to make it.

On 7/19/07, Madhav Bhargava <un...@gmail.com> wrote:
> Hi All,
>
> I have a requirement where the user should not be given control to directly
> type in the path of a file. The user needs to necessarily click the browse
> button and then the path will then be populated in the "disabled on client
> side" input text that gets generated via this component.
>
> I could only find one disabled property on that component but that does not
> do the trick.
>
> Do you have any suggestions?
>
> Thanks,
> Madhav
>
> --
> When I tell the truth, it is not for the sake of convincing those who do not
> know it, but for the sake of defending those that do