开发者

Customizing the Spring Roo generated GWT user interface

How does one go about customizing the GWT user interface that Spring Roo automatically generates?

Am I supposed to change the Roo-generated sou开发者_运维百科rce files? If so, will that not be clobbered the next time Roo runs?

Or do I need to configure something in Roo and then rebuild the GWT sources?

In this particular case, the column widths of the domain object list view need to be adjusted.


For as far as I know, this is indeed not possible yet in Spring Roo. As you rightfully stated, the by Spring Roo generated files will be regenerated by Spring Roo when you alter your entities. There are some solutions, but these all are but small workarounds and don't offer the actual programming experience you'd expect or want. The Spring Roo team (and community) has already addressed this issue though and is working hard to solve this. So expect this to be improved real soon. For more information, check the following links to the Spring Roo Forum and Spring Roo JIRA:

  • Spring Roo Forum thread: Roo GWT customization
  • Spring Roo JIRA issue: Roo update is too destructive
  • Spring Roo JIRA issue: Manual Created Request Interfaces get deleted


May I humbly suggest Metawidget? It generates Spring MVC, GWT and other interfaces at runtime, so there is no regeneration step (and nothing to get 'clobbered') as your entities change.


If you want to modify a ui.xml file generated by ROO, just rename it and refer to it in the .java file.

e.g You want to modify the file PizzaDetailsView.ui.xml:

Rename it to PizzaDetailsViewPrime.ui.xml Then add this line just before the interface Binder declaration:

@UiTemplate("PizzaDetailsViewPrime.ui.xml")

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜