for (Iterator<Property> listIter = data.realPropertyIterator(); listIter.hasNext();) { Property listItem = listIter.next(); Object listItemValue = listItem.getValue(); if (listItemValue instanceof Data) { Data listItemData = (Data) listItemValue;
value = property.getKey().toString(); } else { if (property.getValueType().equals(Data.class)) { if ("sub".equals(fieldName)) { value = new Boolean(true); value = null; } else if ("subset".equals(fieldName)) { value = new KSCustomDataSource(((Data) property.getValue()).iterator()); value = new Boolean(false); } else if ("value".equals(fieldName)) { if (property.getValue() instanceof Date) { value = df.get().format((Date) property.getValue()); } else { if (property.getValue() != null) { value = property.getValue().toString();
List<String> approvedCluIds = new ArrayList<String>(); for (Data.Property p : cluSetHelper.getApprovedClus()) { if(!"_runtimeData".equals(p.getKey())){ String approvedCluId = p.getValue(); approvedCluIds.add(approvedCluId); List<String> proposedCluIds = new ArrayList<String>(); for (Data.Property p : cluSetHelper.getProposedClus()) { if(!"_runtimeData".equals(p.getKey())){ String proposedCluId = p.getValue(); proposedCluIds.add(proposedCluId);
ArrayList<String> listValue = new ArrayList<String>(); for(Iterator<Property> iter =((Data)value.get()).realPropertyIterator();iter.hasNext();){ listValue.add(iter.next().getValue().toString());
while (iter.hasNext()) { Property p = iter.next(); if(!"_runtimeData".equals(p.getKey())){ QueryPath translationPath = new QueryPath(); translationPath.add(new Data.StringKey(qPath.toString())); translationPath.add(new Data.StringKey("_runtimeData")); translationPath.add(new Data.IntegerKey((Integer)p.getKey())); translationPath.add(new Data.StringKey("id-translation")); String translation = model.get(translationPath.toString()); String id = p.getValue().toString(); translations.put(id, translation);
Object fieldData = prop.getValue(); Object fieldKey = prop.getKey(); translateIds(idTranslator, (Data) prop.getValue(), listChildMetadata); } else { .hasNext();) { Property listItem = listIter.next(); Object listData = listItem.getValue(); if (listData != null && listData instanceof String) { if (fieldMetadata.getInitialLookup() != null fieldMetadata.getInitialLookup(), (String) listData); if (trans != null) { Integer index = listItem.getKey(); setTranslation((Data) fieldData, listItem.getKey().toString(), index, trans.getDisplay()); ((Data) listData).<String> get("orgId")); if (trans != null) { Integer index = listItem.getKey(); setTranslation((Data) fieldData, listItem.getKey().toString(), index, trans.getDisplay()); } else if (((Data) prop.getValue()).size() == 1 && ((Data) prop.getValue()).get(0) != null) { ((Data) prop.getValue()).get(0).toString()); if (trans != null) { setTranslation(data, prop.getKey().toString(), null, trans.getDisplay());
int row = 0; for (final Data.Property property : variationMap) { final Data variationData = property.getValue(); final int currentRow = row;
Object value = prop.getValue(); String dataValue = null; if(metadata!=null&&metadata.getInitialLookup()!=null){ QueryPath translatedPath = QueryPath.concat("_runtimeData", prop.getKey().toString(), "id-translation"); dataValue = data.query(translatedPath); Data rowData = prop.getValue(); while (iter.hasNext()) { Data.Property p = iter.next(); Data d = p.getValue(); String key = table.getConfig().getConcatenatedFields().get(fullPath.toString()); sb.append(d.get(key)).append(", ");
Property prop = iter.next(); Object fieldData = prop.getValue(); Object fieldKey = prop.getKey(); __translateIds((Data) prop.getValue(), listChildMetadata); }else{ Object listData = listItem.getValue(); if (listData != null && listData instanceof String) { if (fieldMetadata.getInitialLookup() != null Integer index = listItem.getKey(); setTranslation((Data)fieldData, listItem.getKey().toString(), index, trans.getDisplay()); __translateIds((Data) prop.getValue(), fieldMetadata); setTranslation(data, prop.getKey().toString(), null, trans.getDisplay());
String existingId = (String) ((Data) prop.getValue()).get(ProgramConstants.ID); if(existingId==null){ iter.remove();
if (p.getValueType().equals(Data.class)) { queryRelative((Data) p.getValue(), relative, result);
String existingId = (String) ((Data) prop.getValue()).get(ProgramConstants.ID); if(existingId==null){ iter.remove();
String existingId = (String) ((Data) prop.getValue()).get(ProgramConstants.ID); existingVariationIds.add(existingId); String id = (String) ((Data) prop.getValue()).get(ProgramConstants.ID); if (updatedId.equals(id)) { updatedKey = prop.getKey(); Data currentMetaInfo = ((Data) prop.getValue()).get("meta"); String latestVersionInd = currentMetaInfo.get("versionInd"); Data newMetaInfo = event.getData().get("meta");
String existingId = (String) ((Data) prop.getValue()).get(ProgramConstants.ID); existingVariationIds.add(existingId); String id = (String) ((Data) prop.getValue()).get(ProgramConstants.ID); if (updatedId.equals(id)) { updatedKey = prop.getKey(); Data currentMetaInfo = ((Data) prop.getValue()).get("meta"); String latestVersionInd = currentMetaInfo.get("versionInd"); Data newMetaInfo = event.getData().get("meta");
QueryParamHelper queryParamHelper = QueryParamHelper.wrap((Data)p.getValue()); org.kuali.student.r2.core.search.dto.SearchParamInfo searchParam = new org.kuali.student.r2.core.search.dto.SearchParamInfo(); searchParam.setKey(queryParamHelper.getKey()); searchParam.getValues().add((String) prop.getValue());
/** * @see ModelWidgetBindingSupport#setWidgetValue(Object, * org.kuali.student.common.ui.client.mvc.DataModel, String) */ public void setWidgetValue(MultiplicityGroup mg, DataModel model, String path) { mg.clear(); String fieldPath = mg.translatePath(path); mg.setParentPath(fieldPath); QueryPath qPath = QueryPath.parse(fieldPath); Data data = null; if(model!=null){ data = model.get(qPath); } if (data != null) { Iterator<Property> itr = data.iterator(); while (itr.hasNext()) { Property p = (Property) itr.next(); if (p.getKey() instanceof Integer && !isItemDeleted(model, path, (Integer)p.getKey(), mg)) { MultiplicityGroupItem mgi = mg.createItem(); mgi.setCreated(false); mgi.setItemKey((Integer) p.getKey()); MultiplicityGroupItemBinding.INSTANCE.setWidgetValue(mgi, model, fieldPath); } else { mg.incrementItemKey(); } } } }
/** * @see org.kuali.student.common.ui.client.configurable.mvc.binding.ModelWidgetBindingSupport#setWidgetValue(java.lang.Object, * org.kuali.student.common.ui.client.mvc.DataModel, java.lang.String) */ @Override public void setWidgetValue(MultiplicityComposite mcWidget, DataModel model, String path) { mcWidget.clear(); QueryPath qPath = QueryPath.parse(path); Data data = null; if(model!=null){ data = model.get(qPath); } if (data != null) { Iterator<Property> itr = data.iterator(); while (itr.hasNext()) { Property p = (Property) itr.next(); if (p.getKey() instanceof Integer && !isItemDeleted(model, path, (Integer)p.getKey(), mcWidget)) { MultiplicityItem item = mcWidget.addItem(); item.setCreated(false); item.setItemKey((Integer) p.getKey()); MultiplicityItemBinding.INSTANCE.setWidgetValue(item, model, path); } else { mcWidget.incrementItemKey(); } } } }
private void dataToOutlineNodes(Data data, List<OutlineNode<LOPicker>> loOutlineNodes, int identLevel) { if (data != null) { LoDisplayInfoSortedSet sortedDisplayInfos = new LoDisplayInfoSortedSet(); for (Data.Property property : data) { Data loDisplayInfoData = property.getValue(); LoDisplayInfoHelper loDisplayInfoHelper = new LoDisplayInfoHelper(loDisplayInfoData); sortedDisplayInfos.add(loDisplayInfoHelper); } for (LoDisplayInfoHelper loDisplayInfoHelper : sortedDisplayInfos) { LOPicker picker = new LOPicker(LOBuilder.getMessageGroup(), LOBuilder.getType(), LOBuilder.getState(), LOBuilder.getRepoKey(), LOBuilder.getLoListDescLength()); LoInfoHelper loInfoHelper = new LoInfoHelper(loDisplayInfoHelper.getLoInfo()); RichTextHelper descriptionHelper = new RichTextHelper(loInfoHelper.getDescr()); picker.setLOText(descriptionHelper.getPlain()); List<LoCategoryInfo> categories = getCategoryList(loDisplayInfoHelper); picker.setLOCategories(categories); picker.setMetaInfoData(loInfoHelper.getMeta()); OutlineNode<LOPicker> node = new OutlineNode<LOPicker>(); node.setUserObject(picker); node.setOpaque(loInfoHelper.getId()); node.setIndentLevel(identLevel); loOutlineNodes.add(node); // recurse dataToOutlineNodes(loDisplayInfoHelper.getDisplayInfoList(), loOutlineNodes, identLevel + 1); } } }