[prev in list] [next in list] [prev in thread] [next in thread] 

List:       myfaces-user
Subject:    RE: Issue with file upload after upgrading from 1.0.6 to latest (6/21 build)
From:       "Srikanth Madarapu" <srikanthm () senior-systems ! com>
Date:       2005-06-27 20:38:31
Message-ID: E99F867AFB8C3949BCA3A0B387A5647E8D2664 () mail ! senior-systems ! com
[Download RAW message or body]

I have found the reason for this....

In older version, the setter of the backing bean (for the UploadedFile field) was not \
called if the value is null. So the value in the backing bean which was stored when \
previewed was not overwritten.

In new version the setter is being called even if the value (the file path and name) \
in the inputfile control is null, and hence the value(the contents of UploadedFile) \
in the backing bean are being overwritten when called the setter with null.

I don't which behavior is correct. I guess the bug is in the older version, because \
for all other controls the setters were called even if the values are null.

Thanks
Srikanth



-----Original Message-----
From: Srikanth Madarapu 
Sent: Monday, June 27, 2005 2:40 PM
To: MyFaces Discussion
Subject: Issue with file upload after upgrading from 1.0.6 to latest
(6/21 build)


I am finding some issues with the new version... fixing one by one.... Then next one \
is...

I have a file upload component to upload a picture. The user picks a picture from the \
file dialog and  hits open. Now the user has two choices..

  1) Submit the form, in this case it works as desired (the selected picture is shown \
to the user).  2) The user can preview before submitting the form by clicking a \
preview button. When user clicks it, he/she will see the selected picture on the form \
and then submits. It was working fine in the old version, but with the new version, \
the preview works fine but after submitting the form the user is not seeing the new \
picture he/she selected. After user previews the selected picture the file path and \
name is gone from the text box of upload control (same in the old version). If I put \
the file path and name back into the text box before submitting  the form it works \
fine. So it seems that the control is looking for value in the text box in the new \
version.

What is the difference between old and new versions, is this a bug or do I need to do \
something different in new version ?

TIA
Srikanth

-----Original Message-----
From: Martin Marinschek [mailto:martin.marinschek@gmail.com]
Sent: Saturday, June 25, 2005 12:55 AM
To: MyFaces Discussion
Subject: Re: upgrading from 1.0.6 to the latest version of my faces.


If you use the x:message/x:messages tags, you get meaningful names as
a present along the way ;)

regards,

Martin

On 6/25/05, Srikanth Madarapu <srikanthm@senior-systems.com> wrote:
> Thanks Bruno, I figured that after getting the source. Now I have to get rid of all \
> the spaces, I added them because the <h:messages> tag uses the ids, and to have \
> meaningful names in the error messages, I used names with spaces, because it was \
> allowed !! 
> Thanks again.
> 
> -----Original Message-----
> From: Bruno Aranda [mailto:brunoaranda@gmail.com]
> Sent: Friday, June 24, 2005 4:47 PM
> To: MyFaces Discussion
> Subject: Re: upgrading from 1.0.6 to the latest version of my faces.
> 
> 
> Srikanth, you have components with spaces in its id attribute, and
> according to section 3.1.1 of the spec this is not allowed. The spec
> says that a component id must follow this rules:
> 
> - They must start with a letter (as defined by the Character.isLetter()
> method) or underscore ('_').
> - Subsequent characters may be letters, digits, dashes ('-'), and
> underscores ('_').
> 
> So SPACES are not allowed ;-)
> 
> Regards,
> 
> Bruno
> 
> the id of a component must follow this rules:
> 2005/6/24, Srikanth Madarapu <srikanthm@senior-systems.com>:
> > Hi
> > 
> > I am in the process of upgrading my "MyFaces" from 1.0.6 to the latest version. I \
> > have downloaded the nightly build (6/21). I have compiled my code ran the app \
> > server. When I try to access one of the JSF pages I got the following error... 
> > 05/06/24 15:36:54 java.lang.IllegalArgumentException: Subsequent characters of \
> > component identifier must be a letter, a digit, an underscore ('_'), or a dash \
> > ('-')! But component identifier contains " " 05/06/24 15:36:54       at \
> > javax.faces.component.UIComponentBase.isIdValid(UIComponentBase.java:726) \
> > 05/06/24 15:36:54       at \
> > javax.faces.component.UIComponentBase.setId(UIComponentBase.java:153) 05/06/24 \
> > 15:36:54       at \
> > javax.faces.webapp.UIComponentTag.createComponentInstance(UIComponentTag.java:449)
> >                 
> > ...
> > ...
> > 
> > What is causing this error ?
> > 
> > TIA
> > -Srikanth Madarapu
> > 
> > 
> 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic