Bug 154503 - XML Form Document: Creating of Bindings by Mouseclick on Instance Elements only shown after reopening document
Summary: XML Form Document: Creating of Bindings by Mouseclick on Instance Elements on...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.5.2.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: XML_Form
  Show dependency treegraph
 
Reported: 2023-03-31 07:42 UTC by Robert Großkopf
Modified: 2024-02-05 18:11 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshots with 3 steps to create binding automatically (342.35 KB, image/png)
2023-04-24 06:50 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2023-03-31 07:42:28 UTC
This bug appears after bug 154322 has been solved:
Go to File → New → XML Form Document.
On sidebar go to "Instance 1".
Right mouseclick on "incstanceData" → "Add Element".
Dialog appears with "Element Name:" → 'NewElement'.
Press OK.
Left mouseclick on "NewElement" (creates a "Binding")
Change from "Instance 1" to "Bindings".
Only an empty "Binding 1" appears.
Back to "Instance 1".
Close tree view, reopen tree view and again a click on 'NewElement'.
Change to "Bindings".
Sometimes "Binding 2: New Element" appears. If it doesn't appear: Save the file, close the file, reopen the file: "Binding 2: New Element" will appear.

Seems it is a refreshing problem. If you try to create a new binding while "Binding 2: New Element" doesn't appear name for the new binding will appear as "Binding 3", because "Binding 2" has already be chosen, but doesn't appear.
Comment 1 Buovjaga 2023-04-19 14:56:58 UTC
Repro.

I tried with 7.0, but no binding is created at any point.

"Close tree view, reopen tree view" means collapse and expand the tree view.

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: cfa463cc5446e72a06db5a457bf4d50d4173f31e
CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 19 April 2023
Comment 2 Julien Nabet 2023-04-23 06:42:58 UTC
On pc Debian x86-64 with master sources updated today, I was stuck after this:
Left mouseclick on "NewElement" (creates a "Binding")

=> left mouseclick creates nothing, just select the element.
I tried to continue but saw no binding and don't understand how there could be any binding.
Comment 3 Buovjaga 2023-04-23 06:47:16 UTC
Could it be the behaviour changed after the fix for bug 154535?
Comment 4 Julien Nabet 2023-04-23 06:50:29 UTC
(In reply to Buovjaga from comment #3)
> Could it be the behaviour changed after the fix for bug 154535?

Or perhaps I missed something.
Comment 5 Robert Großkopf 2023-04-23 07:29:48 UTC
(In reply to Julien Nabet from comment #4)
> (In reply to Buovjaga from comment #3)
> > Could it be the behaviour changed after the fix for bug 154535?
> 
> Or perhaps I missed something.

If you have clicked on the new element the binding doesn't appear? So save the file, close the file and reopen the file. It will be there.

Or: Try to create a new binding. GUI will chose name "Binding 2", because "Binding 1" will be chosen to the invisible binding.
Comment 6 Robert Großkopf 2023-04-23 07:30:43 UTC
By the way: With all what you are doing here we will get XML Form documents working. Great!
Comment 7 Julien Nabet 2023-04-23 07:36:20 UTC
(In reply to Robert Großkopf from comment #5)
> (In reply to Julien Nabet from comment #4)
> > (In reply to Buovjaga from comment #3)
> > > Could it be the behaviour changed after the fix for bug 154535?
> > 
> > Or perhaps I missed something.
> 
> If you have clicked on the new element the binding doesn't appear? So save
> the file, close the file and reopen the file. It will be there.
> 
> Or: Try to create a new binding. GUI will chose name "Binding 2", because
> "Binding 1" will be chosen to the invisible binding.

Are you ok with the fact that to create a new binding, the only way is to go to the bindings part, then click on "Add item"?

I mean, in the description you provided, at which moment LO is supposed to create a binding?
BTW, after:
"
Go to File → New → XML Form Document.
On sidebar go to "Instance 1".
Right mouseclick on "incstanceData" → "Add Element".
Dialog appears with "Element Name:" → 'NewElement'.
Press OK.
"
I tried 
"Left mouseclick on "NewElement""
and
"Right mouseclick on "NewElement""
just to be sure there wasn't a pb left/right click confusion, in both cases no binding which appears.


Ideally, a screencast would be useful.
Comment 8 Robert Großkopf 2023-04-23 07:57:58 UTC
(In reply to Julien Nabet from comment #7)

best will be: If I create a new element for an instance and press 'OK' the binding will be created.

I will try to show it later. Not enough time at this moment - running for 2 hours now.
Comment 9 Robert Großkopf 2023-04-24 06:50:35 UTC
Created attachment 186873 [details]
Screenshots with 3 steps to create binding automatically

Screenshot will show 3 steps to get a new binding created automatically with

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 3ec73488e447a693a14a773a7fb96938036c0324
CPU threads: 6; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded
(LO version 2023-04-20)

First step: Starting to add a NewElement.
Second step: Chose name for element and data type.
Third step: Binding for NewElement has been created.

Note: This will work sometimes. When created the screenshots it had been worked as expected. Might be because I switched between screenshots and LO, might be I set the data type - but it worked automatically. Seems there are different events, which execute to get the binding. Should be only one event: Pressing OK when NewElement should be created.
Comment 10 Julien Nabet 2023-04-24 08:29:38 UTC
On pc Debian x86-64 with master sources updated today + kf5 rendering (to be closer to your test), I gave a new try and noticed I hadn't chosen a data type.
So with a data type, when going to Bindings part, I see "Binding 1:newElement" and only with one.

However, I tried too with LO Debian package 7.4.5.1 and I saw the empty "Binding 1" and a non empty "Binding 2: newElement".

Could it be thanks to a very recent commit? (since Buovjaga reproduced the pb with a daily buid from 19/04)
Comment 11 Robert Großkopf 2023-04-24 09:10:40 UTC
(In reply to Julien Nabet from comment #10)
> 
> Could it be thanks to a very recent commit? (since Buovjaga reproduced the
> pb with a daily buid from 19/04)

Waiting for a new daily build which includes changes from weekend. I hope it is working now…
Comment 12 Stéphane Guillou (stragu) 2024-02-05 11:27:53 UTC
(In reply to Robert Großkopf from comment #11)
> Waiting for a new daily build which includes changes from weekend. I hope it
> is working now…
Robert, were you able to test this issue with a recent build?
Comment 13 Robert Großkopf 2024-02-05 15:05:55 UTC
(In reply to Stéphane Guillou (stragu) from comment #12)
> (In reply to Robert Großkopf from comment #11)
> > Waiting for a new daily build which includes changes from weekend. I hope it
> > is working now…
> Robert, were you able to test this issue with a recent build?

Have tested it with different versions of LO, with old user profile, with new user profile:

Sometimes I got the right result with LO 7.6.4.1, also with LO 24.2.0.3: Create a new element and there has been created a binding. But most of the times there has been created a binding in the background and wasn't shown. I have to save the XML-Formdocument, close it and restart it. Then the binding for the new element would appear.

Better than before with the useless empty binding, but not really fixed like the title says: "… shown after reopening" is what most of the times happens here.

Tested with OpenSUSE 15.4 64bit rpm Linux.
Comment 14 Julien Nabet 2024-02-05 18:11:09 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this (this time, after File → New → XML Form Document, I followed precisely the process described in the screenshot).
I tested with all renderings, the binding part can be reproduce this quite easily but sometimes even the instance pane displays wrong since the new element may be missing.

Caolán: thought you might be interested in this one.