protected void rptList_PopulateItem(Item<Map<String, Object>> item) { Map<String, Object> dataRow = item.getModelObject(); // ID FWLabel index = new FWLabel("index"); index.setRenderBodyOnly(true); index.setValue(ConvUtils.convToString(rptList.getFirstItemOffset() + item.getIndex() + 1)); item.add(index); // 用户名称 FWModalPopupLink userName = new FWModalPopupLink("userName"); userName.setLabel(ConvUtils.convToString(dataRow.get("USER_NAME"))); userName.add( AttributeModifier.replace( "onclick", "layer_show('360','','" + ConvUtils.convToString(dataRow.get("USER_NAME")) + "','" + fwContext.getContextRoot() + TransitionUrlConst.USER_DETAIL_PAGE + "?USER_ID=" + ConvUtils.convToString(dataRow.get("OID_USER_ID")) + "')")); item.add(userName); // 手机 FWLabel mobile = new FWLabel("mobile"); mobile.setRenderBodyOnly(true); mobile.setValue(ConvUtils.convToString(dataRow.get("MOBILE"))); item.add(mobile); // 邮箱 FWLabel email = new FWLabel("email"); email.setRenderBodyOnly(true); if (!StringUtils.isEmpty(ConvUtils.convToString(dataRow.get("EMAIL")))) { email.setValue( ConvUtils.convToString(dataRow.get("EMAIL")) + " " + (ConvUtils.convToBool(dataRow.get("EMAIL_VERIFY_FLG")) ? "已验证" : "未验证")); } else { email.setValue("未填写"); } item.add(email); FWContainer selectBtn = new FWContainer("selectBtn"); selectBtn.add( AttributeModifier.replace( "onclick", "selectUserAccount('" + ConvUtils.convToString(dataRow.get("USER_NAME")) + "', '" + ConvUtils.convToString(dataRow.get("OID_USER_ID")) + "', '" + ConvUtils.convToString(dataRow.get("BORROWER_NAME")) + "', '" + ConvUtils.convToString(dataRow.get("BORROWER_ID_CARD")) + "')")); item.add(selectBtn); }
/** * 填充控件。 * * @param 没有 * @return 没有 */ @Override protected void initComponent() { form = new FWForm("form"); body.add(form); // 数据件数 cnt = new FWLabel("cnt"); form.add(cnt); grdContainser = new FWContainer("grdContainser"); form.add(grdContainser); // 明细容器生成 adminDP = new GridDataProvider(); rptList = new FWDataView("rptList", adminDP, this); // 每页件数设定 rptList.setItemsPerPage(getItemsPerPage()); grdContainser.add(rptList); // 分页处理 paging = new ILoanCustomPaging("paging", rptList, form, this); form.add(paging); // 产品类型 ddlFinanceProdId = new FWDropDownChoice("ddlFinanceProdId", new ArrayList<ChoiceNameValue>(), false, this); ddlFinanceProdId.setSelectedValue(""); ddlFinanceProdId.setAjaxOnSubmitEnable(true); form.add(ddlFinanceProdId); // 投资用户 txtFinanceCoutom = new FWTextField("txtFinanceCoutom"); form.add(txtFinanceCoutom); // 检索按钮 findBtn = new FWSubmitLink("findBtn", this); form.add(findBtn); ajaxComponentBind(); }