Skip to content

Commit

Permalink
[SYNCOPE-1846] Allow for extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgrosso committed Dec 10, 2024
1 parent 81961d3 commit cfe797e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ public Component getHeader(final String id, final Component parent, final IWizar
return super.getHeader(id, parent, wizard).setVisible(false);
}

protected Specification newSpecification() {
return new Specification();
}

protected Fragment getViewFragment() {
Fragment viewFragment = new Fragment("relationships", "viewFragment", this);
viewFragment.setOutputMarkupId(true);
Expand All @@ -145,7 +149,7 @@ protected Fragment getViewFragment() {
public void onClick(final AjaxRequestTarget target, final RelationshipTO ignore) {
Fragment addFragment = new Fragment("relationships", "addFragment", Relationships.this);
addOrReplace(addFragment);
addFragment.add(new Specification().setRenderBodyOnly(true));
addFragment.add(newSpecification().setRenderBodyOnly(true));
target.add(Relationships.this);
}
}, ActionType.CREATE, AnyEntitlement.UPDATE.getFor(anyTO.getType())).hideLabel();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -508,15 +508,15 @@ private static Object getPropertyValue(final String propType, final List<?> valu
value = values.get(0) == null || values.get(0).toString().isEmpty()
? null : values.get(0).toString().charAt(0);
} else if (Integer.class.equals(propertySchemaClass) || Integer.TYPE.equals(propertySchemaClass)) {
value = Integer.parseInt(values.get(0).toString());
value = Integer.valueOf(values.get(0).toString());
} else if (Long.class.equals(propertySchemaClass) || Long.TYPE.equals(propertySchemaClass)) {
value = Long.parseLong(values.get(0).toString());
value = Long.valueOf(values.get(0).toString());
} else if (Float.class.equals(propertySchemaClass) || Float.TYPE.equals(propertySchemaClass)) {
value = Float.parseFloat(values.get(0).toString());
value = Float.valueOf(values.get(0).toString());
} else if (Double.class.equals(propertySchemaClass) || Double.TYPE.equals(propertySchemaClass)) {
value = Double.parseDouble(values.get(0).toString());
value = Double.valueOf(values.get(0).toString());
} else if (Boolean.class.equals(propertySchemaClass) || Boolean.TYPE.equals(propertySchemaClass)) {
value = Boolean.parseBoolean(values.get(0).toString());
value = Boolean.valueOf(values.get(0).toString());
} else if (URI.class.equals(propertySchemaClass)) {
value = URI.create(values.get(0).toString());
} else if (File.class.equals(propertySchemaClass)) {
Expand Down

0 comments on commit cfe797e

Please sign in to comment.