View Javadoc

1   /*
2    * $Id: AbstractRemoteTag.java 651946 2008-04-27 13:41:38Z apetrelli $
3    *
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *  http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  package org.apache.struts2.dojo.views.jsp.ui;
23  
24  import org.apache.struts2.dojo.components.RemoteBean;
25  import org.apache.struts2.views.jsp.ui.AbstractClosingTag;
26  
27  public abstract class AbstractRemoteTag extends AbstractClosingTag {
28  
29      protected String href;
30      protected String listenTopics;
31      protected String notifyTopics;
32      protected String loadingText;
33      protected String errorText;
34      protected String executeScripts;
35      protected String handler;
36      protected String formId;
37      protected String formFilter;
38      protected String showErrorTransportText;
39      protected String indicator;
40      protected String showLoadingText;
41      protected String beforeNotifyTopics;
42      protected String afterNotifyTopics;
43      protected String errorNotifyTopics;
44      protected String highlightColor;
45      protected String highlightDuration;
46      protected String separateScripts;
47      protected String transport;
48      protected String parseContent;
49      
50      protected void populateParams() {
51          super.populateParams();
52  
53          RemoteBean remote = (RemoteBean) component;
54          remote.setHref(href);
55          remote.setListenTopics(listenTopics);
56          remote.setLoadingText(loadingText);
57          remote.setErrorText(errorText);
58          remote.setExecuteScripts(executeScripts);
59          remote.setHandler(handler);
60          remote.setFormFilter(formFilter);
61          remote.setFormId(formId);
62          remote.setNotifyTopics(notifyTopics);
63          remote.setShowErrorTransportText(showErrorTransportText);
64          remote.setIndicator(indicator);
65          remote.setShowLoadingText(showLoadingText);
66          remote.setAfterNotifyTopics(afterNotifyTopics);
67          remote.setBeforeNotifyTopics(beforeNotifyTopics);
68          remote.setErrorNotifyTopics(errorNotifyTopics);
69          remote.setHighlightColor(highlightColor);
70          remote.setHighlightDuration(highlightDuration);
71          remote.setSeparateScripts(separateScripts);
72          remote.setTransport(transport);
73          remote.setParseContent(parseContent);
74      }
75  
76      public void setHref(String href) {
77          this.href = href;
78      }
79  
80      public void setErrorText(String errorText) {
81          this.errorText = errorText;
82      }
83  
84      public void setLoadingText(String loadingText) {
85          this.loadingText = loadingText;
86      }
87  
88      public void setListenTopics(String listenTopics) {
89          this.listenTopics = listenTopics;
90      }
91  
92      public void setExecuteScripts(String executeScripts) {
93          this.executeScripts = executeScripts;
94      }
95  
96      public void setHandler(String handler) {
97          this.handler = handler;
98      }
99  
100     public void setFormFilter(String formFilter) {
101         this.formFilter = formFilter;
102     }
103 
104     public void setFormId(String formId) {
105         this.formId = formId;
106     }
107 
108     public void setNotifyTopics(String notifyTopics) {
109         this.notifyTopics = notifyTopics;
110     }
111 
112     public void setShowErrorTransportText(String showErrorTransportText) {
113         this.showErrorTransportText = showErrorTransportText;
114     }
115 
116     public void setIndicator(String indicator) {
117         this.indicator = indicator;
118     }
119 
120     public void setShowLoadingText(String showLoadingText) {
121         this.showLoadingText = showLoadingText;
122     }
123 
124     public void setAfterNotifyTopics(String afterNotifyTopics) {
125         this.afterNotifyTopics = afterNotifyTopics;
126     }
127 
128     public void setBeforeNotifyTopics(String beforeNotifyTopics) {
129         this.beforeNotifyTopics = beforeNotifyTopics;
130     }
131 
132     public void setErrorNotifyTopics(String errorNotifyTopics) {
133         this.errorNotifyTopics = errorNotifyTopics;
134     }
135 
136     public void setHighlightColor(String highlightColor) {
137         this.highlightColor = highlightColor;
138     }
139 
140     public void setHighlightDuration(String highlightDuration) {
141         this.highlightDuration = highlightDuration;
142     }
143 
144     public void setSeparateScripts(String separateScripts) {
145         this.separateScripts = separateScripts;
146     }
147 
148     public void setTransport(String transport) {
149         this.transport = transport;
150     }
151 
152     public void setParseContent(String parseContent) {
153         this.parseContent = parseContent;
154     }
155 }