Skip to Content
0
Former Member
Dec 07, 2009 at 07:00 AM

Problem in making the button disable when mapping is defined

36 Views

Hi experts,

I have a node in my component controller called "Metadata". Inside the node i have an attribute "Submit_enabled" which is of type "wdy_boolean". Similarly i have the same node and the attribute in my view also. And i have defined mapping between the component controller and my view.

Then, I have binded the attribute "Submit_enabled" to a button "Submit" in my view.

On click of button (submit button), i have to make the button disabled.

I am using the below code inside a method in the component controller to try and disable the button.

DATA lo_nd_metadata TYPE REF TO if_wd_context_node.

DATA lo_el_metadata TYPE REF TO if_wd_context_element.

DATA ls_metadata TYPE wd_this->element_metadata.

lo_nd_metadata = wd_context->get_child_node( name = wd_this->wdctx_metadata ).

lo_el_metadata = lo_nd_metadata->get_element( ).

lo_el_metadata->set_attribute(

name = `SUBMIT_ENABLED`

value = ' ' ).

But the button is not getting disabled.

But if i remove the mapping and implement the same code in the view, then the button becomes disabled. But i need to implement the logic in the component controller itself and not in my view.

Kindly help

Regards,

Vinod