[midPoint] Custom schema extension change location
Pavol Mederly
mederly at evolveum.com
Tue Jan 24 10:14:44 CET 2017
Hello Merve,
sorry for the late answer.
It can be done in this way:
column = new AbstractColumn<SelectableBean<UserType>,
String>(createStringResource("pageUsers.tckn")) {
@Override
public void
populateItem(Item<ICellPopulator<SelectableBean<UserType>>> cellItem,
String componentId,
IModel<SelectableBean<UserType>> model) {
String tckn = null;
UserType user = model.getObject().getValue();
if (user != null && user.getExtension() != null) {
PrismProperty<String> tcknProperty =
user.getExtension().asPrismContainerValue().findProperty(new QName("tckn"));
if (tcknProperty != null) {
tckn = tcknProperty.getRealValue();
}
}
cellItem.add(new Label(componentId, tckn));
}
};
And then it looks like this (place the column appropriately for your
situation):
You could probably replace new QName("tckn") with
UserType.EXTENSION_TCKN - I assume you manually added this constant.
(Although beware that UserType is a generated class, so this constant
probably gets overwritten at "mvn clean install".)
Hope this helps,
Pavol Mederly
Software developer
evolveum.com
On 24.01.2017 7:13, mceylan wrote:
> hi,
>
> create custom extension schema "tckn"
>
> I want Tckn is add admin page users list column. For Example
>
>
> name name givenName familyName tckn emailAddress
>
>
> PageUsers.java
>
> column = new
> PropertyColumn(createStringResource("Usertype.tckn"),UserType.EXTENSION_TCKN.getLocalPart(),SelectableBean.F_VALUE
> + ".tckn");
> columns.add(column);
>
>
>
> --
> Merve CEYLAN
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170124/73100b35/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fibiddpojigmpahg.png
Type: image/png
Size: 45738 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170124/73100b35/attachment.png>
More information about the midPoint
mailing list