FileUpload: custom image not shown in exact size

UI Components for JSF
Post Reply
chris.joelly
Posts: 9
Joined: 12 Aug 2011, 18:49

12 Aug 2011, 20:01

Hello,

i want to show a custom image with the upload button, but the image size is not used from the images dimension, and changing it with width/height to the images size of 61x22 does not solve the problem.
The shown image is much bigger than the image, some pixels more in with, and as three times as height as the image, with the image positioned into the upper left corner.

Code: Select all

<h:form id="fileupload">
    <p:fileUpload id="fileUpload" width="61" height="22" image="../images/uploadbutton.jpg" customUI="true" fileUploadListener="#{fileUploadController.processFileUpload}"/>
</h:form>
Whats wrong with my settings?
----------------------------------------
JBoss 7.1.1
PrimeFaces 3.4RC1

chris.joelly
Posts: 9
Joined: 12 Aug 2011, 18:49

12 Aug 2011, 20:03

i looked at the resulting html/javascript code:

Code: Select all

<span id="fileupload:fileUpload"><input type="file" id="fileupload_fileUpload_file" name="fileupload_fileUpload_file" /></span><script type="text/javascript">jQuery(function() {widget_fileupload_fileUpload = new PrimeFaces.widget.Uploader('fileupload:fileUpload', {uploader:'/erp.web/javax.faces.resource/fileupload/uploadify.swf.jsf?ln=primefaces&v=2.2',script:'/erp.web/faces/processlist.jsf',cancelImg:'/erp.web/javax.faces.resource/fileupload/cancel.png.jsf?ln=primefaces&v=2.2',formId:'fileupload',fileDataName:'fileupload_fileUpload_file',multi:false,auto:false,inputFileId:'fileupload_fileUpload_file',jsessionid:'f0da342f45cb90f00915dd4e82da',buttonImg:'../images/uploadbutton.jpg',width:'61',height:'61'});});</script><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="-1227279831754094588:9078904929837010558" autocomplete="off" />
why is the height set to the same size as the width?
----------------------------------------
JBoss 7.1.1
PrimeFaces 3.4RC1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 48 guests