Ejemplo n.º 1
0
 public void onDataLoad(DataLoadEvent se) {
   Dataset ds = se.getSource();
   String keys = ds.getReqParameters().getParameterValue("query_param_keys");
   String values = null;
   if (keys != null && !keys.equals("")) {
     values = ds.getReqParameters().getParameterValue("query_param_values");
   }
   int userType = 0;
   CpMenuItemVO[] menuitems = null;
   ICpMenuQry service = CpbServiceFacility.getMenuQry();
   try {
     menuitems = service.getMenuItemsByCategory(values);
     if (userType == 2 /* CpUserVO.USERTYPE_SYSADMIN */) {
       // menuitems = service.getMenuItemsByCategory(values);
     } else if (userType == 3 /* CpUserVO.USERTYPE_GROUPADMIN */) {
       // appsNodes =
       // CpbServiceFacility.getFunQryService().getNodeByUser(values,
       // userVo.getCuserid(), "");
     }
   } catch (CpbBusinessException e) {
     // TODO Auto-generated catch block
     LfwLogger.error(e.getMessage(), e);
     throw new LfwRuntimeException(e.getMessage());
   }
   if (ArrayUtils.isEmpty(menuitems)) {
     return;
   }
   new SuperVO2DatasetSerializer().serialize(menuitems, ds, Row.STATE_NORMAL);
   postProcessRowSelect(ds);
 }
 public void onDataLoad_pageroleds(DataLoadEvent dataLoadEvent) {
   String pk =
       (String) AppLifeCycleContext.current().getApplicationContext().getAppAttribute("pk_page");
   Dataset ds = dataLoadEvent.getSource();
   if (pk != null) ds.setLastCondition("pk_page='" + pk + "'");
   CmdInvoker.invoke(new UifDatasetLoadCmd(ds.getId()));
 }
Ejemplo n.º 3
0
 public void onDataLoad_ds_appsNode(DataLoadEvent dataLoadEvent) {
   Dataset ds = dataLoadEvent.getSource();
   CmdInvoker.invoke(
       new UifDatasetLoadCmd(ds.getId()) {
         protected String postProcessQueryVO(SuperVO vo, Dataset ds) {
           String values =
               ds.getReqParameters().getParameterValue(DatasetConstant.QUERY_PARAM_VALUES);
           String pk_module = values;
           String where = " pk_appscategory = '" + pk_module + "'";
           return where;
         }
       });
 }
Ejemplo n.º 4
0
 public void onDataLoad_ds_appscategory(DataLoadEvent dataLoadEvent) {
   Dataset ds = dataLoadEvent.getSource();
   CmdInvoker.invoke(new UifDatasetLoadCmd(ds.getId()));
 }