lib/l5m-tools/template/TemplateServicerImpl.java in l5m-tools-0.0.11 vs lib/l5m-tools/template/TemplateServicerImpl.java in l5m-tools-0.1.0
- old
+ new
@@ -7,10 +7,17 @@
import com.l5m.common.bean.DataSourceBeanBase;
import com.l5m.common.bean.GeneralAvailabilityModule;
import com.l5m.common.util.dcnds.QHTCommonUtil;
import com.l5m.customtags.beans.BaseServicerParaBean;
import com.l5m.customtags.tags.utils.GenerateTagUtil;
+import java.sql.SQLException;
+import java.util.ArrayList;
+
+import com.l5m.customtags.beans.annotation.ParseMethodType;
+import com.l5m.customtags.beans.annotation.RequestParse;
+import com.l5m.customtags.module.statebean.ExcelOptionStateBean;
+
import com.l5m.!REPLACE_STYLE!.engine.worker.UserCompanyWorker;
/**
* make sure code as clear as possible.
* don't make another one think.
* if you can't do it, get away.
@@ -22,11 +29,11 @@
* @author Ronghai
*
*/
public class !REPLACE_ME_FILE!ServicerImpl extends BaseServicerParaBean.AbstractBaseServicer{
private static final long serialVersionUID = 1L;
- public static enum PANEL {
+ public static enum PANEL implements com.l5m.customtags.beans.PanelTab{
REPORT("REPORT") ,
Help("Help"), DataAvailability("Data Availability")
; //Total Day/Prime * LSD/C3
private final String label;
private boolean enable;
@@ -49,26 +56,32 @@
return enable;
}
public int panelIndex(){
return this.ordinal();
}
+ @Override
+ public int getPanelIndex() {
+ return panelIndex();
+ }
}
@Override
public void clearCache() {
super.clearCache();
- this.servicerParamBean.setPanelIndex(0);
-
+ this.servicerParamBean.resetPanelIndex2Default();
System.gc();
}
@Override
public void handlePaginator(int panelIndex) {
+ if(panelIndex == PANEL.DataAvailability.panelIndex() || panelIndex == PANEL.Help.panelIndex() ){
+ return ;
+ }
if (this.servicerParamBean.getPaginatorStateBean(panelIndex) == null) {
this.servicerParamBean.setPaginatorStateBean(GenerateTagUtil.initPaginatorStateBean("PaginatorStateBeanTag"), panelIndex);
this.servicerParamBean.getPaginatorStateBean(panelIndex).setRowsPerPage(1);
}
@@ -86,11 +99,15 @@
@Override
public void init( ) {
super.init();
try {
- this.servicerParamBean = new BaseServicerParaBean(this.dh, this.companyId, this.groupId , this.userId, this.userCompanyId, PANEL.values().length);
+ if(this.servicerParamBean == null){
+ this.servicerParamBean = new BaseServicerParaBean();
+ }
+ this.servicerParamBean .init(this.dh, this.companyId, this.groupId , this.userId, this.userCompanyId, PANEL.values().length);
this.servicerParamBean.initDisplayAndSortBy();
+ this.servicerParamBean.setDefaultPanelIndex(PANEL.REPORT.panelIndex());
try{
this.initTimeSpan();
}catch(Exception e){
e.printStackTrace();
this.servicerParamBean.initTimeSpan();