PDA

View Full Version : FileUploadField : Button only



aschaeffer
4 Jul 2012, 1:53 AM
Hi there,

I want to display a fileuploadfield in a form, but I would like to display only the button. I've read that it should be possible (al least in ext-js, i've found something here : http://dev.sencha.com/deploy/ext-4.0.0/examples/form/file-upload.html).

I tried to find something here or somewhere else, without success.

Thanks in advance for your help.

scottmartin
6 Jul 2012, 10:06 AM
Please review the following:



Ext.create('Ext.form.field.File', {
renderTo: 'fi-button',
buttonOnly: true,
hideLabel: true,
listeners: {
'change': function(fb, v){
var el = Ext.get('fi-button-msg');
el.update('<b>Selected:</b> '+v);
if(!el.isVisible()){
el.slideIn('t', {
duration: 200,
easing: 'easeIn',
listeners: {
afteranimate: function() {
el.highlight();
el.setWidth(null);
}
}
});
}else{
el.highlight();
}
}
}
});


Scott.

aschaeffer
9 Jul 2012, 4:04 AM
First, thanks for your answer, but unfornately, this doesn't help me...

I'm sorry, my previous post might have been a little confusing because I mentioned a link about EXT JS 4. But I'm looking for a way to do it in GXT 2.x.

scottmartin
9 Jul 2012, 7:24 AM
I have moved your post the the GXT forums.

Scott.

PhiLho
10 Jul 2012, 4:07 AM
Well, that's still the wrong place, this forum is for GXT 3, not for Ext GWT 2.

Note: you probably have space constraints, but as a user, I wouldn't appreciate such component as there is no feedback on the selected document (unless you use a tooltip or process it immediately).

scottmartin
10 Jul 2012, 7:59 AM
Well, that's still the wrong place, this forum is for GXT 3, not for Ext GWT 2.

well crap .. I have moved it to GWT2 .. sorry about that ...

Scott.