PreferenceRegistry registry = (PreferenceRegistry)getInstance(PreferenceRegistry.class);
PreferenceEntity docEditorEntity = registry.getPreferenceEntitiesByName().get("DocEditor");
invokeMethod("#{userHome.initPreferencesEditor}");
PreferenceEditor prefEditor = (PreferenceEditor)getInstance(PreferenceEditor.class);
prefEditor.selectPreferenceEntity(docEditorEntity);
}
}.run();
new FacesRequest("/userHome_d.xhtml") {
protected void beforeRequest() {
setParameter("cid", conversationId);
}
protected void invokeApplication() throws Exception {
PreferenceEditor prefEditor = (PreferenceEditor)getInstance(PreferenceEditor.class);
List<PreferenceValue> values = prefEditor.getPreferenceValues();
// This is somewhat dodgy... no other way to get the value we want
for (PreferenceValue value : values) {
if (value.getPreferenceProperty().getFieldName().equals("minorRevisionEnabled")) {
assert value.getValue().equals(Boolean.TRUE); // Should be the system setting
value.setValue(false);