View Javadoc
1   package gboat2.base.view.jsp;
2   
3   import gboat2.base.view.GboatViewUtil;
4   import gboat2.base.view.components.Remote;
5   
6   import javax.servlet.http.HttpServletRequest;
7   import javax.servlet.http.HttpServletResponse;
8   
9   import org.apache.struts2.components.Component;
10  import org.apache.struts2.views.jsp.ComponentTagSupport;
11  
12  import com.opensymphony.xwork2.util.ValueStack;
13  
14  /**
15   * @see gboat2.base.view.components.Remote
16   * @author <a href="mailto:[email protected]">何明旺</a>
17   * @since 3.0
18   * @date 2014年5月4日
19   */
20  public class RemoteTag extends ComponentTagSupport {
21  
22      private static final long serialVersionUID = 1L;
23  
24      protected String targets;
25      
26      protected String href;
27      
28      protected String formIds;
29      
30      protected String indicator;
31      
32      protected String loadingText;
33      
34      protected String errorText;
35      
36      protected String errorElementId;
37      
38      protected String dataType;
39      
40      protected String requestType;
41      
42      protected String effect;
43      
44      protected String effectDuration;
45      
46      protected String effectOptions;
47      
48      protected String effectMode;
49      
50      protected String timeout;
51      
52      protected String listenTopics;
53      
54      protected String onEffectCompleteTopics;
55  
56      @Override
57      public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
58          return new Remote(stack);
59      }
60      
61      @Override
62      protected void populateParams() {
63          super.populateParams();
64          GboatViewUtil.populateParams(this, component);
65      }
66  
67      public void setTargets(String targets) {
68          this.targets = targets;
69      }
70  
71      public void setHref(String href) {
72          this.href = href;
73      }
74  
75      public void setFormIds(String formIds) {
76          this.formIds = formIds;
77      }
78  
79      public void setIndicator(String indicator) {
80          this.indicator = indicator;
81      }
82  
83      public void setLoadingText(String loadingText) {
84          this.loadingText = loadingText;
85      }
86  
87      public void setErrorText(String errorText) {
88          this.errorText = errorText;
89      }
90  
91      public void setErrorElementId(String errorElementId) {
92          this.errorElementId = errorElementId;
93      }
94  
95      public void setDataType(String dataType) {
96          this.dataType = dataType;
97      }
98  
99      public void setRequestType(String requestType) {
100         this.requestType = requestType;
101     }
102 
103     public void setEffect(String effect) {
104         this.effect = effect;
105     }
106 
107     public void setEffectDuration(String effectDuration) {
108         this.effectDuration = effectDuration;
109     }
110 
111     public void setEffectOptions(String effectOptions) {
112         this.effectOptions = effectOptions;
113     }
114 
115     public void setEffectMode(String effectMode) {
116         this.effectMode = effectMode;
117     }
118 
119     public void setTimeout(String timeout) {
120         this.timeout = timeout;
121     }
122 
123     public void setListenTopics(String listenTopics) {
124         this.listenTopics = listenTopics;
125     }
126 
127     public void setOnEffectCompleteTopics(String onEffectCompleteTopics) {
128         this.onEffectCompleteTopics = onEffectCompleteTopics;
129     }
130 }