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.sandbox.infrastructure.client;

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/GWT_Sandbox/MultiModule/common/src/org/litesoft/sandbox/infrastructure/client/CachedViewSynchronousActivityFactory.java

Diff revisions: vs.
Revision Author Commited Message
585 Diff Diff GeorgeS picture GeorgeS Fri 18 Nov, 2011 17:55:26 +0000
540 GeorgeS picture GeorgeS Mon 03 Oct, 2011 04:22:28 +0000