Monday, January 21, 2013

Dialog Box in GWTP for Dummies

Dialog Box in GWTP  for Dummies


One of the important thing in GWT is Dialog box, which will enable user to get alerted, prompt messages, helped to give input to application etc...

Its very simple creating a dialog box in GWTP, create a Presenter with PopupView and inject the presenter into the place (Parent Presenter) it is required based on the event in Parent presenter.

The example show a simple dialog box appear for the button click event in mail window.

<g:DialogBox width="" glassEnabled="true" animationEnabled="true"
modal="true">
<g:caption>This is Heading</g:caption>
<g:HTMLPanel width="400px" height="200px">
<g:VerticalPanel spacing="10" horizontalAlignment="ALIGN_CENTER"
width="100%" height="100%" verticalAlignment="ALIGN_MIDDLE">
<g:Button width="150px" height="30px" ui:field="close"> Close Me!!!</g:Button>
</g:VerticalPanel>
</g:HTMLPanel>
</g:DialogBox>

Dialog box in this example is Modal and with glass enable is set to true to make the user not to navigate in rest of the window other than Dialog box.







No comments:

Post a Comment