由于Roo的项目必须是maven构建的,所以有固定的src目录结构;名字也是自动生成的(@question希望在使用Roo命令时可以修改 );
模块:applicationScaffold
继承User
继承Standard theme
继承Activity
继承Place
继承Inject :gwt的依赖注入模块,项目名字叫Gin ,是基于Guice 的
继承RequestFactory :可以理解为客户端entity管理
继承CellView
继承Text
继承Logging
entry-point:**.client.scaffold.Scaffold
源client
源shared
公共public
下面配置表示对InjectorWrapper的注入会根据客户端不同而采用Desktop或者Mobile的InjectorWapper
<define-property name="mobile.user.agent" values="mobilesafari, none"/> <property-provider name="mobile.user.agent"> <![CDATA[ var ua = navigator.userAgent.toLowerCase(); if (ua.indexOf("webkit") != -1 && ua.indexOf("mobile") != -1) { return "mobilesafari"; } var isMobile; // Look for the m as a url argument if (isMobile == null) { var args = location.search; var startMobile = args.indexOf("m"); if (startMobile >= 0) { var mobile = args.substring(startMobile); var begin = mobile.indexOf("=") + 1; var end = mobile.indexOf("&"); if (end == -1) { end = mobile.length; } isMobile = mobile.substring(begin, end); } } if (isMobile){ return "mobilesafari"; } return "none"; ]]> </property-provider>
meta tag
css: 没有指定css
js: applicationScaffold/applicationScaffold.nocache.js
span: 显示loading...
实现EntryPoint.onModuleLoad():通过DesktopInjectorWrapper得到DesktopInjector得到ScaffoldDesktopApp 对象并调用该对象的run方法。