Oxygen Author Applet. Xref insertion
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 35
- Joined: Fri Nov 11, 2011 10:34 am
Oxygen Author Applet. Xref insertion
Post by maxim.kovalev »
How in Oxygen Author Applet I can check up insertion possibility xref in a current node?
Whether after an insertion xref probably to change behavior at pushing the link?
Whether after an insertion xref probably to change behavior at pushing the link?
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Oxygen Author Applet. Xref insertion
Hi,
So you have two questions:
A CIElement contains information about the possible name and namespace (+ other info) of an element which would be allowed in the context.
This callback received when a user clicks a link sets as a behavior opening the URL in the same component but you can take a different approach for the received URL, possibly create another AuthorComponentProvider from the factory and use a JTabbedPane to handle multiple components in the same applet.
If this does not answer your questions maybe you should provide more details about your user case.
Regards,
Radu
So you have two questions:
You could use code like this:How in Oxygen Author Applet I can check up insertion possibility xref in a current node?
Code: Select all
AuthorSchemaManager schemaManager = authorAccess.getDocumentController().getAuthorSchemaManager();
WhatElementsCanGoHereContext wecgh = schemaManager.createWhatElementsCanGoHereContext(authorAccess.getEditorAccess().getCaretOffset());
List<CIElement> possibleChildrenElements = schemaManager.getChildrenElements(wecgh);
In the ro.sync.ecss.samples.AuthorComponentSample there is some code like:Whether after an insertion xref probably to change behavior at pushing the link?
Code: Select all
//Open a clicked link in the same component
factory.setOpenURLHandler.....
If this does not answer your questions maybe you should provide more details about your user case.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 35
- Joined: Fri Nov 11, 2011 10:34 am
Re: Oxygen Author Applet. Xref insertion
Post by maxim.kovalev »
About the second question. It is necessary that the special window (selector) opened at pushing on xref links where I can specify other object to change the link. The window is ready already, it is necessary to call only it on xref link pushing. How it to make?
-
- Posts: 35
- Joined: Fri Nov 11, 2011 10:34 am
-
- Posts: 35
- Joined: Fri Nov 11, 2011 10:34 am
Re: Oxygen Author Applet. Xref insertion
Post by maxim.kovalev »
Code: Select all
// Open a clicked link in the same component
factory.setOpenURLHandler(new OpenURLHandler() {
public void handleOpenURL (URL arg0) throws IOException {
arg0 contains (FF8)
"file:/C:/Program%20Files%20(x86)/Reference/reference_Some_section.dita".
arg0 contains (IE8) "file:/C:/Documents%20and%20Settings/ga/Reference/reference_Some_section.dita"
Oxygen changed href when puts in URL. Need href. Needed to keep its value. It's possible?
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Oxygen Author Applet. Xref insertion
Hello Maxim,
Oxygen makes an absolute URL from the relative location by looking at the URL of the current edited resource.
The URL of the current edited resource is usually set on this API method:
ro.sync.ecss.extensions.api.component.AuthorComponentProvider.load(URL, Reader)
So you need to set a relevant URL for the current resource which is edited in the Author Component, this will also help you identify the target of the link.
Regards,
Radu
Oxygen makes an absolute URL from the relative location by looking at the URL of the current edited resource.
The URL of the current edited resource is usually set on this API method:
ro.sync.ecss.extensions.api.component.AuthorComponentProvider.load(URL, Reader)
So you need to set a relevant URL for the current resource which is edited in the Author Component, this will also help you identify the target of the link.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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