Enabling :xtype in component even if not in lazy rendering
Now you can use :xtype parameter to create diverse components even if not inside a container
In ExtJs the config parameter xtype have no effect when used in a constructor call (new Ext.Component({xtype=...})). In Rwt you can use it in any case (after commit 8d7c3933). This is nice when you are trying new configuration options.
So, for example, you can now create a window using a syntax like this (more ext like)
component(:xtype=>'window',:title=>'Test Window',:width=>200,:height=>200) do |w|
component(:xtype=>'button',:text=>'Close me!') do |b|
b.on('click') do
w.close
end
end
end.show
Or, in the rwt way:
window('Test Window',200,200) do |w|
button('Close me!') do |b|
b.on('click') do
w.close
end
end
end
Comments