Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » data transfer from TreeField to the server module
data transfer from TreeField to the server module [message #1807262] Mon, 27 May 2019 06:58 Go to next message
Krzysztof Leja is currently offline Krzysztof LejaFriend
Messages: 55
Registered: April 2019
Member
Hi,
In my application, on the form I used TreeField similarly, as it was in the example at https://scout.bsi-software.com/widgets/?dl=widget-treefield.
The content of this field comes from my class, extending AbstractCodeType.
This field is checkable.
I would like to submit data from this field to the server side service.
For this purpose, I am using an automatically generated transfer object containing the AbstractTreeFieldData type field.

My question:
How to read the elements selected by the user in the TreeField using this transfer object?

On the server side, I am able to read the tree structure using the AbstractTreeFieldData.getRoots () method, but I do not see the method to check which node was selected and its identifier/name. In addition, for all nodes of the TreeNodeData.getTexts () method and TreeNodeData.getValues () does not return anything.
Re: data transfer from TreeField to the server module [message #1807493 is a reply to message #1807262] Fri, 31 May 2019 07:17 Go to previous messageGo to next message
Patrick Baenziger is currently offline Patrick BaenzigerFriend
Messages: 96
Registered: September 2011
Member
You might want to consider the TreeBox widget instead: It is a ValueField, which means it keeps track of what the user entered/clicked.

The set of checked keys (equal to the key of your Code or LookupCall for the checked nodes) will be exported into the FormData and can be read or set on the server side of your application.
Re: data transfer from TreeField to the server module [message #1808415 is a reply to message #1807493] Mon, 24 June 2019 08:54 Go to previous message
Krzysztof Leja is currently offline Krzysztof LejaFriend
Messages: 55
Registered: April 2019
Member
Thank you for the tips. It helped.

Although I preferred TreeField, because it had a nice option with nesting dedicated menu inside this field, but it is not a big loss for me, so TreeBox is also OK.
I added a menu outside this box and it does not look bad.
Previous Topic:TreeBox
Next Topic:disabling the eclipse scout application from indexing by robots
Goto Forum:
  


Current Time: Tue Nov 05 06:25:12 GMT 2024

Powered by FUDForum. Page generated in 0.03045 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top