KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > tutorial > modules > actions > portlets > CafeBrowserAction


1 /*
2  * Copyright 2000-2001,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.jetspeed.tutorial.modules.actions.portlets;
17
18 import org.apache.turbine.util.RunData;
19 import org.apache.turbine.util.Log;
20
21 import org.apache.velocity.context.Context;
22
23 import org.apache.jetspeed.portal.portlets.VelocityPortlet;
24 import org.apache.jetspeed.modules.actions.portlets.browser.DatabaseBrowserAction;
25 import org.apache.jetspeed.services.resources.JetspeedResources;
26
27 /**
28  * Handle refresh
29  *
30  * @author <a HREF="mailto:taylor@apache.org">David Sean Taylor</a>
31  * @version $Id: CafeBrowserAction.java,v 1.1 2004/04/08 17:03:54 taylor Exp $
32  */

33 public class CafeBrowserAction extends DatabaseBrowserAction
34 {
35     public static final String JavaDoc BROWSER_COMMAND = "cb_command";
36     public static final String JavaDoc BROWSER_REFRESH = "refresh";
37     /**
38      * Build the normal state content for this portlet.
39      *
40      * @param portlet The velocity-based portlet that is being built.
41      * @param context The velocity context for this request.
42      * @param rundata The turbine rundata context for this request.
43      */

44     protected void buildNormalContext( VelocityPortlet portlet,
45                                        Context context,
46                                        RunData rundata )
47     {
48         String JavaDoc refresh = rundata.getParameters().getString(BROWSER_COMMAND);
49         if (refresh != null && refresh.equals(BROWSER_REFRESH))
50         {
51             this.clearDatabaseBrowserIterator(portlet,rundata);
52         }
53         super.buildNormalContext(portlet, context, rundata);
54     }
55 }
56
57
Popular Tags