1. #1
    Ext User
    Join Date
    Sep 2007
    Posts
    67
    Vote Rating
    0
    Air_Mike is on a distinguished road

      0  

    Default FileUploadField rendered with width 0

    FileUploadField rendered with width 0


    Hello,

    I have Window which contains formPanel. I'm using FileUploadField to add field for file upload but this filed is rendered with width 0.

    Code:
    {
            xtype: 'fileuploadfield',
    	id: 'importFile',
    	emptyText: trans["generic.selectFile"],
    	fieldLabel: trans["tokens.manage.importFile"],
    	name: 'importFile',
    	width: 230,
    	buttonText: trans["generic.browse"]
    }
    When I use upload field in formPanel that is not in window I don't have this problem.

    Screenshot is in attachment.

    Thank You...
    Attached Images

  2. #2
    Ext JS Premium Member saJoshua's Avatar
    Join Date
    Nov 2007
    Location
    South Africa
    Posts
    521
    Vote Rating
    5
    saJoshua is on a distinguished road

      0  

    Default


    drill down to the element using "inspect" in "firebug". Examining this will help you to see what styles are conflicting / causing the element to render at zero pixel width.

  3. #3
    Ext User
    Join Date
    Sep 2007
    Posts
    67
    Vote Rating
    0
    Air_Mike is on a distinguished road

      0  

    Default


    Thank you for replying.

    Yes I did that, and none of css properties are setting width to 0.
    This width is set in input style attribute.

    Code:
    <input type="text" id="importFile" autocomplete="on" size="20" class=" x-form-text x-form-field x-form-file-text x-form-empty-field" readonly="" style="width: 0px;"/>
    I don't know who or what is setting this style property (probably somewhere in Ext.form.TextField because FileUploadField extends TextField)

  4. #4
    Sencha User steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,664
    Vote Rating
    7
    steffenk has a spectacular aura about steffenk has a spectacular aura about steffenk has a spectacular aura about

      0  

    Default


    what happen if you omit your width in configuration?
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  5. #5
    Ext User
    Join Date
    Sep 2007
    Posts
    67
    Vote Rating
    0
    Air_Mike is on a distinguished road

      0  

    Default


    When I omit width I get picture1 (field width is not 0 - there is no style attribute style="width: 0px;", but the width is not ok)

    Because this field must be populated I get picture2 when field don't pass validation
    Attached Images

  6. #6
    Sencha User steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,664
    Vote Rating
    7
    steffenk has a spectacular aura about steffenk has a spectacular aura about steffenk has a spectacular aura about

      0  

    Default


    the width property is the right one, so you have something like a js error or a invalid sign so the property isn't set proper. Try output it to console

    btw: in examples there is a nice fileupload example with own button, why don't you adapt this?
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  7. #7
    Ext User
    Join Date
    Sep 2007
    Posts
    67
    Vote Rating
    0
    Air_Mike is on a distinguished road

      0  

    Default


    @steffenk - I did use that file upload example but I put it in window (and there was one problem)

    Well,

    I just wanted to say that I solved (bypass) this problem, but I'm not sure if it is a bug in Ext, because I found similar problems with form items width.

    Problem shows when I render form panel (with its items) in window and for showing window
    use animate from Ext.getBody(). In this case file upload item had width 0, but in other example combo box item was longer than text item in same form.

    I bypassed this problem by puting this items in column.

  8. #8
    Ext User
    Join Date
    Oct 2007
    Location
    France, Redon
    Posts
    40
    Vote Rating
    0
    gaetan is on a distinguished road

      0  

    Default fileuploadfield in window form problem : bug ?

    fileuploadfield in window form problem : bug ?


    I have the same problem, and I think that there is something bad with the layout.
    If you run the example in a window you can see the same problem.
    The input field is set with a width of 0 pixel.
    If you hack the size using firebug, the field is correct.
    If you resize the window, the onResize function is called and the field size is set with the correct value.

    I thing that it's a bug
    Could Ext team help us ?

  9. #9
    Ext User
    Join Date
    Sep 2007
    Posts
    21
    Vote Rating
    0
    gtomalesky is on a distinguished road

      0  

    Default FileUploadField rendered with width 0

    FileUploadField rendered with width 0


    Hi All: Same problem. Fixed it by removing the animateTarget property from the Window config.

  10. #10
    Sencha User Mjollnir26's Avatar
    Join Date
    Oct 2008
    Location
    Germany
    Posts
    152
    Vote Rating
    0
    Mjollnir26 is on a distinguished road

      0  

    Default


    Same goes for me; no window at all,
    using FF 3.6.6 on WinXP with ExtJS 3.2.1
    Component hierarchy is as follows:
    Viewport-> Center-Region-> GroupTab -> TabPanel -> CardLayout -> Form

    Will investigate further in Firebug and post results

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi