Hello everyone!
I found a new trouble in my project - I cannot remove a field from field group column “Time Zone” at ExtUserEdit screen.
Because it should be changed on customTimeZone
Here the base project with this thing examplePr.zip (89.9 KB)
Hi,
Thank you for your sample project.
It seems, you can simply customize User-editor screen instead of creating a new screens for ExtUser. How to do it is described here: Extending Screens - CUBA Platform. Developer’s Manual
In Studio start new screen wizard and select “Extend an existing screen”
As result. Two sources will be created: ExtUserEditor.java and ext-user-edit.xml
Then we need to remove the timeZone field from the edit-screen.
We cannot remove anything from the parent screen using XML. Moreover the timeZone field is custom and tuned in the screen controller. So lets modify ExtUserEditor.java
public class ExtUserEditor extends UserEditor {
@Override
public void init(Map<String, Object> params) {
super.init(params);
fieldGroupRight.removeField("timeZone");
}
}
Now we need a component for your custom TimeZone. The most simple way is just to add the property to fieldGroup. Modify ext-user-edit-xml as follows: You can also make this field custom and adjust it in the screen controller. How to do it see the code of the parent UserEditor class.
Pay attention to “userDs” above. It should contain the link to custom TimeZone, so change “class” to ExtUser and do not forget to create the corresponding view.