KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openi > xmla > navigator > NavigatorTag


1 /*
2  * ====================================================================
3  * This software is subject to the terms of the Common Public License
4  * Agreement, available at the following URL:
5  * http://www.opensource.org/licenses/cpl.html .
6  * Copyright (C) 2003-2004 TONBELLER AG.
7  * All Rights Reserved.
8  * You must accept the terms of that agreement to use this software.
9  * ====================================================================
10  *
11  *
12  */

13 package org.openi.xmla.navigator;
14
15 import javax.servlet.jsp.JspException JavaDoc;
16
17 import com.tonbeller.jpivot.olap.model.OlapModel;
18 import com.tonbeller.wcf.component.Component;
19 import com.tonbeller.wcf.component.ComponentTag;
20 import com.tonbeller.wcf.controller.RequestContext;
21
22 /**
23  * Created on 09.12.2002
24  *
25  * @author av
26  */

27 public class NavigatorTag extends ComponentTag {
28
29   String JavaDoc query;
30
31   /**
32    * creates the navigator component
33    */

34   public Component createComponent(RequestContext context) throws JspException JavaDoc {
35     OlapModel olapModel = (OlapModel) context.getModelReference(query);
36     if (olapModel == null)
37       throw new JspException JavaDoc("query \"" + query + "\" not found");
38     return new Navigator(getId(), null, olapModel);
39   }
40
41   /**
42    * Returns the query.
43    * @return String
44    */

45   public String JavaDoc getQuery() {
46     return query;
47   }
48
49   /**
50    * Sets the query.
51    * @param query The query to set
52    */

53   public void setQuery(String JavaDoc query) {
54     this.query = query;
55   }
56
57 }
58
Popular Tags