@Target(value=TYPE) public @interface ProxyCodeSplitBundle
Proxy
s and their associated
Presenter
s to sit behind one split point
and to be compiled into one javascript file separately from others.
Use this annotation if you already have too much code splitting using
ProxyCodeSplit
and it is more efficient to group
Presenter
s because they share a bulk of
their code. You will also have to set up your own implementation of a
ProviderBundle
.
ProviderBundles can be created manually or be generated by GWTP. For the manual approach
the bundleClass()
and id()
need to be defined.
Here is an example use of ProxyCodeSplitBundle
using manual declaration:
@ProxyCodeSplitBundle(bundleClass = MyPresenterBundle.class, id = MyPresenterBundle.ID_Object1) public interface MyProxy extends ProxyPlace<Object1> { }If you use GWTP's generation of
ApplicationController
all bundles
will be automatically generated for you, all that you need are string identifiers for each unique bundle.
The best way to keep your bundles in order is to create an interface that identifies your bundles.
public interface Bundles { String MAIN = "Main"; String OTHER = "Other"; }Here is an example use of {@link ProxyCodeSplitBundle} when using GWTP's generation feature:
{@code @ProxyCodeSplitBundle(Bundles.MAIN) public interface MyProxy extends ProxyPlace<Object1> { }
ProviderBundle
,
Code SplittingModifier and Type | Optional Element and Description |
---|---|
Class<? extends ProviderBundle> |
bundleClass |
int |
id |
String |
value |
public abstract Class<? extends ProviderBundle> bundleClass
public abstract int id
public abstract String value
Copyright © 2010-2014 ArcBees. All Rights Reserved.