Oxygen Author Component refresh problems
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 19
- Joined: Tue Mar 11, 2014 11:56 am
Oxygen Author Component refresh problems
Post by alexandr.golovach »
Hi, Oxygen guys!
I use Oxygen Author Component in our application.
When I edit document in Oxygen and I push F5 button for refresh current page in browser, I have this message :
Then I push "Yes" or "No" and I have different problems.


How can I hide this message(Save dialog)?
Regards,
Alexandr
I use Oxygen Author Component in our application.
When I edit document in Oxygen and I push F5 button for refresh current page in browser, I have this message :

Then I push "Yes" or "No" and I have different problems.


How can I hide this message(Save dialog)?
Regards,
Alexandr
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Oxygen Author Component refresh problems
Post by alex_jitianu »
Hi Alexandr,
The reload action is bounded in the action map of the author page. First thing you must do is to remove it, something like this:
After removing I don't think F5 will be processed by the browser. You'll have to install an action yourself on the applet and maybe invoke Javascript to do the refresh. You can add an action like so:
Best regards,
Alex
The reload action is bounded in the action map of the author page. First thing you must do is to remove it, something like this:
Code: Select all
JComponent jComponent = (JComponent)editorComponent.getEditorComponent();
removeReloadAction(jComponent);
private void removeReloadAction(JComponent jComponent) {
jComponent.getActionMap().remove("Author__Reload");
int componentCount = jComponent.getComponentCount();
for (int i = 0; i < componentCount; i++) {
Component child = jComponent.getComponent(i);
if (child instanceof JComponent) {
removeReloadAction((JComponent) child);
}
}
}
Code: Select all
JComponent jComponent = (JComponent)editorComponent.getEditorComponent();
// Install a different reload action to delegate to the browser.
Action action = new AbstractAction() {
@Override
public void actionPerformed(ActionEvent e) {
System.out.println("REFRESH");
}
};
jComponent.getActionMap().put("refresh-override", action);
jComponent.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0, false), "refresh-override");
Alex
-
- Posts: 19
- Joined: Tue Mar 11, 2014 11:56 am
Re: Oxygen Author Component refresh problems
Post by alexandr.golovach »
Thank you, Alex, very much!
Your suggestions are working great.
Best, Alexandr.
Your suggestions are working great.
Best, Alexandr.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service