Page 1 of 1

Bug with onChange on oxy_combobox

Posted: Fri Jun 21, 2019 4:51 pm
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

Re: Bug with onChange on oxy_combobox

Posted: Mon Jun 24, 2019 2:24 pm
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

Re: Bug with onChange on oxy_combobox

Posted: Fri Jun 28, 2019 4:12 pm
by Johann
Hello Alex,

Thanks for your reply.

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

Johann

Re: Bug with onChange on oxy_combobox

Posted: Fri Jun 28, 2019 4:45 pm
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

Re: Bug with onChange on oxy_combobox

Posted: Tue Jul 09, 2019 1:36 pm
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

Re: Bug with onChange on oxy_combobox

Posted: Wed Jul 10, 2019 8:18 am
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

Re: Bug with onChange on oxy_combobox

Posted: Wed Jul 10, 2019 11:05 am
by Johann
Yes, we do.

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

Thank you,

Johann

Re: Bug with onChange on oxy_combobox

Posted: Wed Jul 10, 2019 11:37 am
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

Re: Bug with onChange on oxy_combobox

Posted: Wed Jul 10, 2019 12:00 pm
by Johann
I am currently using the 20.1.0.3 SDK version.

Johann

Re: Bug with onChange on oxy_combobox

Posted: Wed Jul 10, 2019 12:32 pm
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

Re: Bug with onChange on oxy_combobox

Posted: Mon Jul 15, 2019 2:40 pm
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

Re: Bug with onChange on oxy_combobox

Posted: Tue Jul 16, 2019 8:14 am
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

Re: Bug with onChange on oxy_combobox

Posted: Fri Jul 19, 2019 9:12 am
by Radu
Hi,

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

Regards,
Radu

Re: Bug with onChange on oxy_combobox

Posted: Fri Jul 19, 2019 9:48 am
by Johann
Perfect ! We will try this !

Thanks,

Johann