StylesFilter issue when reopening document

Post here questions and problems related to oXygen frameworks/document types.
Posts: 66

StylesFilter issue when reopening document

Thu Jun 14, 2018 3:06 pm


I am using oxygen SDK and I have a problem with the StylesFilter class.
The goal is to add programmatically a combobox at a particular node. I want to do this programmatically because the labels and the values of this combobx are not fixed.
For this purpose, I added this kind of code in MyStylesFilter :

Code: Select all

            if (AuthorNode.NODE_TYPE_ELEMENT == authorNode.getType() && ("myElement".equals(authorNode.getName()))) {
                Map<String, Object> formControlArgs = new HashMap<>();
                formControlArgs.put(InplaceEditorArgumentKeys.PROPERTY_EDIT_QUALIFIED, "@myAttribute");
                formControlArgs.put(InplaceEditorArgumentKeys.PROPERTY_VALUES, "value1,vale2,value3");
                formControlArgs.put(InplaceEditorArgumentKeys.PROPERTY_LABELS,  "label1,label2,label3");

                formControlArgs.put(InplaceEditorArgumentKeys.PROPERTY_EDITABLE, "false");
                StaticContent[] mixedContent = new StaticContent[]{new EditorContent(formControlArgs)};
                styles.setProperty(Styles.KEY_MIXED_CONTENT, mixedContent);
                return styles;

When I launch my application and open the document, I see the combobox perfectly.
But, if I close the document and re-open the same document, the combobox does not appear.
If I press F5, the combobox re-appears.
In the same way, if the combobox is not visible, if I collapse and expand the block in which the combobox is located, the combobox re-appears.

It's like the page didn't want to render...

Can you help me on this ?



Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 0 guests