on 11-25-2013 5:31 PM
Hi experts,
I've got some doubts on a simple task and would like to get an hint on the best approach to do it.
Simply: I've got a table, which is bound to a node with cardinality 0:n.
When the user sets a lead selection, then details are shown (a list on inputfields) on a box below the table.
Since the logic that manages "enable" and "visible" properties of each inputfields are quite complex, I created these inputfield statically and bound to the Context node.
So:
when the user selects an item in table, then all the fields of the item are shown as inputfield in a TransparentContainer that follows.
Problem:
if the table is empty, I get a dump as there's no node/element for the binding.
How can I overcome the problem? Obviously, setting cardinality to 1:n is *not* a solution, as the fact the table could be empty is absolutely correct by specifications.
Do I have to make it via dynamic programming? I'd like to avoid this, as many of the properties of these input fields are set statically...
Any hint is welcome
Hi,
Create another Node with cardinality 1:1 and bind the input fields to that node instead of binding to the table's Node. Then in onLeadSelect read the selected row and set it to the input field's Node.
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks everybody,
the workaround suggested by Kiran worked flawlessy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
agree with Kiran you can create an on lead selection event, set the node: which is bound to the UI element .
Regards ,
Venkat Ratnam Naidu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matteo,
I agree with Kiran's suggestion but you can resolve your issue by hiding whole block of input fields if table is empty.
Solution1:
Create a context attribute VISIBILITY.
Bind the visibility property of the container ui element in which input fields are located to a context attribute
During table entries population, set the value to context attribute VISIBILITY to none if table is empty else set to "visible"
Solution2:
i.e. get the container element in which your input fields are placed
lo_container ?= view->get_element( 'container_name' ).
if so you can set inpout fields visibility property to "none",
lo_container->set_visible( value = cl_wd_uielement=>e_visible-none ).
else.
lo_container->set_visible( value = cl_wd_uielement=>e_visible-visible ).
endif.
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.