+ "."
+ parentConceptPropertyConfig
.getCode();
String parentPropertyName = getLocalizer()
.getString(parentPropertyKey, this);
Label parentPropertyNameLabel = new Label(
"propertyName", parentPropertyName);
PropertyNameLabelValuePanelPair propertyNameLabelValuePanelPair = new PropertyNameLabelValuePanelPair();
propertyNameLabelValuePanelPair
.setPropertyNameLabel(parentPropertyNameLabel);
ModelContext parentModelContext = new ModelContext(
modelContext);
parentModelContext.setEntity(parentEntity);
parentModelContext
.setPropertyConfig(parentConceptPropertyConfig);
ViewContext parentViewContext = new ViewContext(
viewContext);
parentViewContext.setWicketId("valuePanel");
Panel parentPropertyPanel;
if (parentConceptPropertyConfig
.getPropertyClass().equals(
"java.net.URL")
|| parentConceptPropertyConfig
.getPropertyClass()
.equals(
"org.dmlite.type.email.Email")) {
parentPropertyPanel = new ExternalLinkPanel(
parentModelContext,
parentViewContext);
} else {
parentPropertyPanel = new LabelPanel(
parentModelContext,
parentViewContext);
} // if
if (!app.isNeighborDisplayAllowed(
getAppSession(), neighborConfig)) {
parentPropertyPanel.setVisible(false);
} else if (!app.isPropertyDisplayAllowed(
getAppSession(),
parentConceptPropertyConfig)) {
parentPropertyPanel.setVisible(false);
}
propertyNameLabelValuePanelPair
.setPropertyValuePanel(parentPropertyPanel);
propertyNameLabelValuePanelPairs
.add(propertyNameLabelValuePanelPair);
} // if
} // if
} // for
} // if
} // if
} // for
PropertiesConfig propertiesConfig = conceptConfig
.getPropertiesConfig();
for (IEntity propertyConfigEntity : propertiesConfig) {
PropertyConfig propertyConfig = (PropertyConfig) propertyConfigEntity;
if (!propertyConfig.isReference()) {
String propertyKey = conceptCode + "."
+ propertyConfig.getCode();
String propertyName = getLocalizer().getString(propertyKey,
this);
Label propertyNameLabel = new Label("propertyName",
propertyName);
PropertyNameLabelValuePanelPair propertyNameLabelValuePanelPair = new PropertyNameLabelValuePanelPair();
propertyNameLabelValuePanelPair
.setPropertyNameLabel(propertyNameLabel);
entityModelContext.setPropertyConfig(propertyConfig);
ViewContext propertiesViewContext = new ViewContext(
viewContext);
propertiesViewContext.setWicketId("valuePanel");
Panel propertyValuePanel;
if (propertyConfig.getPropertyClass()
.equals("java.net.URL")
|| propertyConfig.getPropertyClass().equals(
"org.dmlite.type.email.Email")) {
propertyValuePanel = new ExternalLinkPanel(
entityModelContext, propertiesViewContext);
} else if (propertyConfig.getPropertyClass().equals(
"java.lang.String")
&& propertyConfig.isValidateType()
&& (propertyConfig.getValidationType().equals(
"java.net.URL") || propertyConfig
.getValidationType().equals(
"org.dmlite.type.email.Email"))) {
propertyValuePanel = new ExternalLinkPanel(
entityModelContext, propertiesViewContext);
} else {
propertyValuePanel = new LabelPanel(entityModelContext,
propertiesViewContext);
}
if (!app.isPropertyDisplayAllowed(getAppSession(),
propertyConfig)) {
propertyNameLabel.setVisible(false);
propertyValuePanel.setVisible(false);
}
propertyNameLabelValuePanelPair
.setPropertyValuePanel(propertyValuePanel);