guptaro
17 Aug 2008, 9:46 AM
Greetings!
I have taken up learning extJs and working with it very recently. I have gone through the examples given on the site and tried to create some pages. Besides I am trying to read as many articles as I could get either on this site or any other site I could find by searching on Google to clearly understand how components can be rendered and what part do layouts play when rendering a component. Some of my attempts have been successful and I managed to create what I wanted but some of them simply wouldn't work as I want them.
For example I want to use the following code to create a couple of datefields and then two buttons one to post the query to server and one to reset. Both the buttons appear one above the other with no space in between whereas I want them to appear side by side. I tried using column layout inside form layout. But the buttons would just disappear.
var searchPanel = new Ext.FormPanel({
region:'north',
labelWidth: 75,
height:150,
items: {
xtype:'tabpanel',
activeTab: 0,
defaults:{autoHeight:true, bodyStyle:'padding:20px'},
items:[{
//title:'.',
layout:'form',
defaults: {width: 130},
defaultType: 'textfield',
items: [ new Ext.form.DateField({
fieldLabel: 'Start Date',
name: 'startdt',
id: 'startdt',
//vtype: 'daterange',
endDateField: 'enddt' // id of the end date field
}),
new Ext.form.DateField({
fieldLabel: 'End Date',
name: 'enddt',
id: 'enddt',
//vtype: 'daterange',
startDateField: 'startdt' // id of the start date field
}),
new Ext.Button({
text:'Reset'
}),
new Ext.Button({
text:'Search'
})
]
}]
}
});
I feel there are some fundamental concepts that I have not picked yet and hence struggling to control the laying out of components as I would like.
Any pointers to right tutorials or documents discussing how to control rendering of components will be much appreciated.
Is there a book scheduled to be published sometime soon?
Thanks in advance.
I have taken up learning extJs and working with it very recently. I have gone through the examples given on the site and tried to create some pages. Besides I am trying to read as many articles as I could get either on this site or any other site I could find by searching on Google to clearly understand how components can be rendered and what part do layouts play when rendering a component. Some of my attempts have been successful and I managed to create what I wanted but some of them simply wouldn't work as I want them.
For example I want to use the following code to create a couple of datefields and then two buttons one to post the query to server and one to reset. Both the buttons appear one above the other with no space in between whereas I want them to appear side by side. I tried using column layout inside form layout. But the buttons would just disappear.
var searchPanel = new Ext.FormPanel({
region:'north',
labelWidth: 75,
height:150,
items: {
xtype:'tabpanel',
activeTab: 0,
defaults:{autoHeight:true, bodyStyle:'padding:20px'},
items:[{
//title:'.',
layout:'form',
defaults: {width: 130},
defaultType: 'textfield',
items: [ new Ext.form.DateField({
fieldLabel: 'Start Date',
name: 'startdt',
id: 'startdt',
//vtype: 'daterange',
endDateField: 'enddt' // id of the end date field
}),
new Ext.form.DateField({
fieldLabel: 'End Date',
name: 'enddt',
id: 'enddt',
//vtype: 'daterange',
startDateField: 'startdt' // id of the start date field
}),
new Ext.Button({
text:'Reset'
}),
new Ext.Button({
text:'Search'
})
]
}]
}
});
I feel there are some fundamental concepts that I have not picked yet and hence struggling to control the laying out of components as I would like.
Any pointers to right tutorials or documents discussing how to control rendering of components will be much appreciated.
Is there a book scheduled to be published sometime soon?
Thanks in advance.