Since this was a requirement in my project, I was able to solve this.
We have subclassed most of sencha's widgets that we use since we need to tweak one thing or another and for this modification I do strongly suggest to encapsulate it.
So in your subclass of the DualListField you need 3 new methods:
PHP Code:
private void setTitles(String pFromTitle, String pToTitle) {
HorizontalPanel panel = (HorizontalPanel) getPanel();
VerticalPanel buttonBar = (VerticalPanel) getButtonBar();
panel.remove(getFromView());
panel.remove(getToView());
panel.remove(buttonBar);
ContentPanel cp = new ContentPanel();
cp.setHeadingText(pFromTitle);
cp.add(getFromView());
panel.add(cp);
panel.add(buttonBar);
cp = new ContentPanel();
cp.setHeadingText(pToTitle);
cp.add(getToView());
panel.add(cp);
}
private native Object getPanel() /*-{
return [email protected]::panel;
}-*/;
private native Object getButtonBar() /*-{
return [email protected]::buttonBar;
}-*/;
And in your constructor you can simply call after the super call
PHP Code:
setTitles(pFromTitle, pToTitle);
Hope this will help future generations... ;-)
Have fun!
-hcr-