litesoft
@ 948
litesoft / trunk / GWT_Sandbox / FormEngine / src / com / temp / client / foundation / widget / ViewComposite.java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
package com.temp.client.foundation.widget; import com.google.gwt.user.client.ui.*; import com.temp.client.foundation.pavment.*; import com.temp.client.foundation.util.*; import com.temp.client.foundation.widget.dialog.*; /** * This class provides a home for common behavior across all our "page-like" * Views. * * @author georgs */ public abstract class ViewComposite extends Composite implements View { /** * When the Widget is injected, set the "ID" of the Widget to a simplified * class Name. * <p/> * Simplified class Name is one that: * <ol> * <li>Ignores Inner Classes (removes '$' and anything after)</li> * <li>Removes the "package" (everything thru the last '.')</li> * <li>Removes "Impl" from the end if there</li> * </ol> * e.g. * "com.temp.client.module.dashboard.dash.DashViewImpl$1" -> * "DashView" */ @Override protected void initWidget( Widget widget ) { super.initWidget( widget ); UtilsGwt.setIdToClassNameOf( widget, this ); } public void showLibraryAccountNotFoundError() { alert( "No Library Account Name", "Please file a Contact Us Report" ); } protected void alert( String title, String... bodyTextBlocksAboveCloseButton ) { createAlert( title, bodyTextBlocksAboveCloseButton ).show(); } protected AlertDialog createAlert( String title, String... bodyTextBlocksAboveCloseButton ) { return new AlertDialog( title, bodyTextBlocksAboveCloseButton ).centerContent(); } } |