Re: Extending/embedding DialogBox

2011-08-03 Thread Wulfsberg
Aidan, that was exactly my point: You lose UIBinder control over the caption there, forcing you to create your dialog box from a mix of Java parameters and UIBinder XML, which grates somewhat. In my opinion, it should be either/or, not a mix. I can see a point for making a fairly standardized

Re: Extending/embedding DialogBox

2011-08-03 Thread Brian Reilly
That's exactly what I do. Use of UiBinder is then simply an implementation detail of how the UI is constructed for the custom dialog. If you want your custom dialog to be created from UI templates, there are a few options for initializing both a caption and a widget. 1. use a text attribute in

Re: Extending/embedding DialogBox

2011-08-02 Thread Derek
I generally create custom Dialogs as their own uibinders and then instantiate them from elsewhere. So I might use the code below, and display it with new MyDialog().center(); Is this best practice? I'm not sure. I think there are some who hold to the idea that you should let your dialog's content

Re: Extending/embedding DialogBox

2011-08-02 Thread Brian Reilly
I've found that you can add a visible=false attribute to the g:DialogBox tag to keep it from being displayed on page load. However, I think this will cause the dialog box UI to be constructed even if it's never displayed. I'm guessing that the you're not supposed to do this comment you're

Re: Extending/embedding DialogBox

2011-08-02 Thread Aidan O'Kelly
You can actually just change your UiBinder java class to inherit from DialogBox, and call setWidget(uiBinder.createAndBind(this)) instead of the regular, initWidget() method of Composite. Your UiBinder template then just looks like this: ui:UiBinder ... g:HTMLPanel

Extending/embedding DialogBox

2011-08-01 Thread Wulfsberg
I am a little confused over the best practice use of DialogBox when using UIBinders. In UIBinder xml, you can include a DialogBox element, and configure it using, say, the caption element or text attributes. This seems to hint that you can embed a full DialogBox definition, letting a widget carry