Tuesday, November 18, 2008

GWT - How to change implementation based on properties

In module file:

<define-property name="entryPoint" values="snp,RunManagement,JobTracking">

<replace-with class="au.com.interdev.snp.client.runmgmt.RunManagementUI">
<when-type-is class="au.com.interdev.snp.client.SNPUI">
<when-property-is name="entryPoint" value="RunManagement">
</when-property-is>
</when-type-is></replace-with>
</define-property>

In html file:

<meta name="gwt:property" content="entryPoint=RunManagement">


You can also set the property via some javascript in the module file - see the module file fo i18n

No comments: