Subversion Repository Public Repository

litesoft

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
package org.litesoft.GWT.client.pavsupport;

import com.google.gwt.place.shared.*;
import com.google.gwt.user.client.ui.*;

public abstract class CachedViewSynchronousActivityFactory<CommonActivityParam extends CommonActivityParameter, View extends IsWidget, APlace extends Place> implements ActivityFactory.Synchronous<CommonActivityParam, View, APlace>
{
    private final String mPlaceID;
    private View mCachedView;

    public CachedViewSynchronousActivityFactory( Object pPlaceID )
    {
        mPlaceID = pPlaceID.toString();
    }

    @Override
    public final String getPlaceId()
    {
        return mPlaceID;
    }

    @Override
    public synchronized final View getView()
    {
        if ( mCachedView == null )
        {
            mCachedView = createView();
        }
        return mCachedView;
    }

    abstract protected View createView();
}

Commits for litesoft/trunk/Java/GWT/Client/src/org/litesoft/GWT/client/pavsupport/CachedViewSynchronousActivityFactory.java

Diff revisions: vs.
Revision Author Commited Message
720 Diff Diff GeorgeS picture GeorgeS Sun 10 Jun, 2012 16:20:42 +0000
712 GeorgeS picture GeorgeS Sat 09 Jun, 2012 22:46:04 +0000

Move PAV stuff into LiteSoft