Пример #1
0
 /**
  * 根据key填充参照对应的显示值
  *
  * @param widget
  * @param ref
  */
 public static void fetchRefShowValue(LfwWidget widget, ReferenceComp ref) {
   String value = ref.getValue();
   if (value == null || value.equals("")) {
     ref.setShowValue(null);
     return;
   }
   String showValue = ref.getShowValue();
   if (showValue != null && !showValue.equals("")) return;
   if (showValue == null || showValue.equals("")) {
     String refCode = ref.getRefcode();
     if (refCode != null) {
       IRefNode refNo = (IRefNode) widget.getViewModels().getRefNode(refCode);
       if (refNo instanceof RefNode) {
         RefNode refnode = (RefNode) widget.getViewModels().getRefNode(refCode);
         ILfwRefModel refmodel = LfwRefUtil.getRefModel(refnode);
         String name = refmodel.matchRefName(value);
         ref.setShowValue(name);
       }
     }
   }
 }
Пример #2
0
 public static int getRefType(ILfwRefModel model) {
   return model.getRefType().intValue();
 }