我有一个要求。我在 Web Content Display portlet 中
添加了两个文本字段Value
和结构。Key
现在在 portlet 中,我从下面的硬代码中获得了价值。
BasicModel model = (BasicModel)requestContext.getFlowScope().get("BasicModel");
if(model == null){
model = new BasicModel();
}
model.setEmployeeId("AB1223344S");
model.setHireDate("01-Jan-2000");
model.setNiNumber("AB123456S");
model.setDateOfBirth("12-Dec-1980");
model.setBasicForm(new BasicDetailsForm());
}
但我想要的value
是attribute
从web content
. 就像,如果我在添加的 Web 内容结构字段中
给出了lfr.intel.empid
askey
和as 值,就像这样。ABSD1822D
我们可以像这样获取键的值。
model.setEmployeeId(lfr.intel.empid);