Bug with onChange on oxy_combobox

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

Bug with onChange on oxy_combobox

Post by Johann »

Hello everyone,

I am using the Oxygen SDK 20.1.0.3 and I have a problem with the option "onChange" of an oxy_combobox.

Here is my test case :

Code: Select all


node1 {
  content: oxy_combobox(
  edit, "@attribute", 
  editable, false, 
  values, "val1, val2", 
  labels, "label1, label2", 
  onChange, oxy_action(
            name, 'Insert', 
            description, 'Insert an element after the current one', 
            operation, 'ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation', 
            arg-fragment, '<element></element>',
            arg-insertLocation, '.',
            arg-insertPosition, 'After'));
}

node2 {
  content: oxy_textfield(edit, "#text", editable, "true");
}

When I change the value of the combobox in node1, the oxy_action is triggered and an element is created after the node1 => OK
When I edit manually the oxy_textfield of the node2, the oxy_action is also triggered and an element is created after the node2 => KO


Do you reproduce this bug ?

Thanks,


Johann
alex_jitianu
Posts: 1008
Joined: Wed Nov 16, 2005 11:11 am

Re: Bug with onChange on oxy_combobox

Post by alex_jitianu »

Hi Johann,

Thank you for reporting this issue. I've managed to reproduce it myself and I've logged an issue to fix it. As an alternative, you could use an AuthorDocumentFilter to intercept the attribute edit event and perform other changes.

If the combo box contains just a few possible values, you could opt for a Button group form control. Each entry is a compound action that updates the attribute and inserts the element as well:

Code: Select all

node1 {
  content: 
oxy_buttonGroup(
    icon, url('http://www.oxygenxml.com/img/icn_oxy20.png'),
    actions, 
      oxy_action_list(
         oxy_compound_action(
            name, 'label1',
            oxy_action(
           		name, 'label1', 
           		operation, 'ChangeAttributeOperation', 
           		arg-name, 'attribute',
           		arg-value, 'value1',
           		arg-elementLocation, '.'
           	),
           	oxy_action(
           		name, 'Insert', 
           		operation, 'InsertFragmentOperation', 
           		arg-fragment, '<element></element>',
           		arg-insertLocation, '.',
           		arg-insertPosition, 'After'
           	)
        )
        , 
        oxy_compound_action(name, 'label2')
      )
  )
         
  
  }
https://www.oxygenxml.com/doc/versions/ ... ction.html
https://www.oxygenxml.com/doc/versions/ ... ditor.html

Please let me know if I should give more details about any of the alternatives.

Best regards,
Alex
Johann
Posts: 198
Joined: Wed Jun 17, 2015 12:46 pm

Re: Bug with onChange on oxy_combobox

Post by Johann »

Hello Alex,

Thanks for your reply.

Do you have any idea of the release date that will contain this patch?

Johann
alex_jitianu
Posts: 1008
Joined: Wed Nov 16, 2005 11:11 am

Re: Bug with onChange on oxy_combobox

Post by alex_jitianu »

Hello Johann,

I've put the issue on the next maintenance build. Unfortunately, the last maintenance build was just released 2 weeks ago so it will probably take a couple more weeks until we release the next one. It also depends on how many issues get resolved and how critical they are so I can't offer a precise date...

Best regards,
Alex
Johann
Posts: 198
Joined: Wed Jun 17, 2015 12:46 pm

Re: Bug with onChange on oxy_combobox

Post by Johann »

Hello,

Do you have any update about the next maintenance build ? Our customer expects a correction at the beginning of August...


Thank you,

Johann
alex_jitianu
Posts: 1008
Joined: Wed Nov 16, 2005 11:11 am

Re: Bug with onChange on oxy_combobox

Post by alex_jitianu »

Hello,

I think so. We already fixed it in the current development stream and we wait for the quality assurance team to verify it. Afterwards, we might wait to include a few other fixes and we will make the release. You are actually embedding the author component, right? In that case a SDK release would be what you need.

Best regards,
Alex
Johann
Posts: 198
Joined: Wed Jun 17, 2015 12:46 pm

Re: Bug with onChange on oxy_combobox

Post by Johann »

Yes, we do.

Ok, perfect ! Please, let me know when this maintenance release is ready.

Thank you,

Johann
alex_jitianu
Posts: 1008
Joined: Wed Nov 16, 2005 11:11 am

Re: Bug with onChange on oxy_combobox

Post by alex_jitianu »

Hello,

Another aspect worth clarifying is that the maintenance build I am referring to is for version 21.1. I just want to make sure that you are using this version and not an older version.

Best regards,
Alex
Johann
Posts: 198
Joined: Wed Jun 17, 2015 12:46 pm

Re: Bug with onChange on oxy_combobox

Post by Johann »

I am currently using the 20.1.0.3 SDK version.

Johann
alex_jitianu
Posts: 1008
Joined: Wed Nov 16, 2005 11:11 am

Re: Bug with onChange on oxy_combobox

Post by alex_jitianu »

Hello,

Unfortunately, you need to update to version 21.1. You should check if the license you have already entitles you to use version 21.1. If it doesn't, then you can either buy an upgrade or you can use one of the alternatives I've mentioned:
As an alternative, you could use an AuthorDocumentFilter to intercept the attribute edit event and perform other changes.

If the combo box contains just a few possible values, you could opt for a Button group form control. Each entry is a compound action that updates the attribute and inserts the element as well:
Best regards,
Alex
Johann
Posts: 198
Joined: Wed Jun 17, 2015 12:46 pm

Re: Bug with onChange on oxy_combobox

Post by Johann »

Ok, I'm trying to upgrade to 21.1 SDK version.

Is it normal that some modules (com.oxygenxml:oxygen-saxon, com.oxygenxml:oxygen-xercesImpl, com.oxygenxml:oxygen-resolver...) do not exist in 21.1 version ?

Thanks,

Johann
alex_jitianu
Posts: 1008
Joined: Wed Nov 16, 2005 11:11 am

Re: Bug with onChange on oxy_combobox

Post by alex_jitianu »

Hi,

Starting with version 21.1 we use a new naming scheme:
- oxygen-patched-saxon-9he
- oxygen-patched-xerces
- oxygen-patched-resolver

Best regards,
Alex
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Bug with onChange on oxy_combobox

Post by Radu »

Hi,

We released version "21.1.0.2" of our Maven SDK which should have this problem fixed.

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

Re: Bug with onChange on oxy_combobox

Post by Johann »

Perfect ! We will try this !

Thanks,

Johann
Post Reply