imposedInitialPage with Oxygen SDK 21.1

Post here questions and problems related to oXygen frameworks/document types.
Johann
Posts: 198
Joined: Wed Jun 17, 2015 12:46 pm

imposedInitialPage with Oxygen SDK 21.1

Post by Johann »

Hello,

I have tried the Oxygen 21.1 SDK. I noticed that when I open a document, it opens by default in Source view (instead of Author view) whereas in the framework :

Code: Select all

          <field name="useImposedInitialPage">
            <Boolean>true</Boolean>
          </field>
          <field name="imposedInitialPage">
            <String>Author</String>
          </field>
Have you changed something about that in 21.1 version ? I have not found anything about this...

Thanks,

Johann
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: imposedInitialPage with Oxygen SDK 21.1

Post by Radu »

Hi Johann,

This API method:

Code: Select all

  /**
   * Creates a new author component
   * @param allowedPages The pages which will be used in the editor. One of the constant fields: 
   * {@link EditorPageConstants#PAGE_TEXT}, {@link EditorPageConstants#PAGE_AUTHOR}, {@link EditorPageConstants#PAGE_GRID}
   * @param initialPage The initial page in which the component will edit. Can be <code>null</code> in order to auto detect it.
   *  
   * @return the new author component
   * @throws AuthorComponentException
   * 
   * @since 14.2
   */
ro.sync.ecss.extensions.api.component.AuthorComponentFactory.createEditorComponentProvider(String[] allowedPages, String initialPage)
has an "initialPage" argument. I think that indeed I changed a little bit its implementation in the 21 SDK.
You can set it to null in your code, meaning that the framework configuration should be used for auto-detect.
But if you set it to "Text" this means that you are imposing "Text".

I think that before my change the behavior was that even if you set the initial page to "Text" the framework had more priority. Now the framework is used only if you set it to "null".

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Johann
Posts: 198
Joined: Wed Jun 17, 2015 12:46 pm

Re: imposedInitialPage with Oxygen SDK 21.1

Post by Johann »

Hello Radu,

Indeed, it works with your solution.

Thanks !

Johann
Post Reply