I can not reproduce this. What do your buttons do, and are you using a
language other than english?
thanks,
lark
Kadah, Feraz wrote:
>
> Hello everybody, I have a problem which I'm note able fix:
>
>
>
> I am using the "*Woodstock 4.1 **Build 12*" components on "*Glassfish
> V2 b58g*". I've got three buttons positioned on the JSP which work
> very well until I place the FileUpload-Component on the page. After
> that, the actions of the buttons are not longer performed and the
> application is feckless.
>
>
>
> I've looked at the Woodstock-Examples and tried to upload a small file
> but this was also unsuccessful. A path is shown in the example, but
> the file is not existent.
>
>
>
>
>
> This is the code I've implemented in my application:
>
>
>
> *In the JSP:*
>
> * *
>
> *<webuijsf:upload* *id*="upload1" *label*="Choose a file: "
>
> *valueChangeListener*="*#{FileUploadedListener.processValueChange}*"*/>*
>
>
>
>
>
> *In the BackingBean:*
>
>
>
> *public* *void* loadImage(ValueChangeEvent event) throws
> AbortProcessingException {
>
>
>
> logger.log(Level.INFO, "[loadImage] Start");
>
> Object value = event.getNewValue();
>
> if (value != null && value instanceof UploadedFile) {
>
> UploadedFile uploadedFile = (UploadedFile)value;
>
> String name = uploadedFile.getOriginalName();
>
> if (name == null || name.length() == 0) {
>
> name = "tmp.tmp";
>
> }
>
> String suffix = name.substring(name.indexOf("."));
>
> if (suffix.length() == 0) {
>
> suffix = ".tmp";
>
> }
>
> String prefix = name.substring(0, name.indexOf("."));
>
>
>
> try {
>
> File fileDir = new
> File("C:/Programme/glassfish-v2-b58g/domains/domain1/docroot/");
>
> File imgFile = File.createTempFile(prefix, suffix, fileDir);
>
> uploadedFile.write(imgFile);
>
> } catch (Exception noFileUpload) {
>
> logger.log(Level.SEVERE, "[loadImage] Fehler beim Bildupload!",
> noFileUpload);
>
> }
>
> }
>
> logger.log(Level.INFO, "[loadImage] Ende");
>
> }
>
>
>
>
>
>
>
> Now I don't know, if I am making any mistake or if it is a bug in the
> Woodstock's.
>
> I hope you can help me, because I'm already desperate... J
>
>
>
>
>
>
>
>
>
> With best regards,
>
> Feraz Kadah
>
>
>
> *G F O S mbH*
>
> Cathostraße 5 *· * 45356 Essen
>
> Amtsgericht Essen, HRB 7600
>
> Geschäftsführer: Burkhard Röhrig
>
>
>
> Tel.: +49 (0)2 01 / 61 30 00
>
> Fax: +49 (0)2 01 / 61 93 17
>
> _Kadah.Feraz_at_gfos.com <mailto:kadah.feraz_at_gfos.com>___
>
>
>
>
>
>
>
> GFOS live erleben!
>
> X/TIME Anwenderforum-- Essen, 18.-19.09.2007, Philharmonie Essen
> Systems--München, 23.-26.10.2007, Halle A.1, Stand 212 + Stand 201.23
>
> Weitere Messen und News unter: http://www.gfos.com/
>
>
> ###########################################
> This message has been scanned by F-Secure Anti-Virus.
> For more information, connect to http://www.f-secure.com/