cancel
Showing results for 
Search instead for 
Did you mean: 

Disabled Buttons, Textboxes, everything.

Former Member
0 Kudos

Hello,

When I run my application, all fields and buttons bound to the context appear disabled. Their enabled property are all true.

What should I do?

Thanks,

Marcelo

Accepted Solutions (1)

Accepted Solutions (1)

former_member751941
Active Contributor
0 Kudos

Hi Marcelo,

I think you have not created any element.If you fields are under Node (0..n or 0..1)

then you have to initialize your node in side "public void wdDoInit()" Method.

For 0..n node use code inside wdDoInit.

wdContext.node<node_name>().addElement(wdContext.create<node_name>Element());

For 0..1 node use code inside wdDoInit.

wdContext.node<node_name>().bind(wdContext.create<node_name>Element());

For Buttons you have to create actions for the buttons and associate it with "onAction" Event of the button.

Regards,

Mithu

Former Member
0 Kudos

This solved the problem! Thanks a lot for your help!

Former Member
0 Kudos

Hello Marcelo:

Could you tell us the solution of your problem please, Im having the same issue.

Thanks

Mario G

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Could you check you are setting the input parameter structure for the RFC.

(if RFC has Structure as Input parameter )

Like below code:........

rfc_input_input bapiInput = new rfcm_Input();

rfcm_inputparamter_stru inputstructure = new rcfm_inputparamter_stru();

bapiInput .set(inputstructure )

Thanks

Sreeni

former_member187990
Participant
0 Kudos

Hi,

For a Button you must create an ActionHandler and it must be Specified in the OnAction property of the Button.

check the cardinality of the UI Element which is bound to the context.

if the cardinality is of type 0..n then you must add elements in order to make the UIElements enabled.

If the cardinality is 0f type 1..n then it will be in the enabled state as default.

Sample code for populating the datas in to the UIElement(Table) from the RFC,

<"Bapi Name"> <obj> = new <"Bapi Name">;
    wdContext.node<"Bapi Name">().bind(<"object name">);
    try
    {
    	wdContext.node<"Bapi Name">()..current<"Bapi Element">.modelObject().execute();
    	wdContext.node<Bapi Name>().invalidate();
    }
    catch(Exception e)
    {
    	e.getStackTrace();
    }

Former Member
0 Kudos

You should check if the context has any elements; otherwise the UI elements have no way to store their bound properties and get disabled by the framework.

Armin

Former Member
0 Kudos

Yes, the context is filled with elements... all elements I need. Im using a model from an RFC by the way.

Former Member
0 Kudos

Can you prove that

Armin

Former Member
0 Kudos

Screenshot:

//removed screenshot

The context looks ok.

Message was edited by:

Armin Reichert

Former Member
0 Kudos

Well, that's only the designtime. You must ensure that there are elements in the node at runtime. If using a model, ensure that the model has been created and bound against the context.

Armin

(Please don't insert pictures, we are text-only here)

Former Member
0 Kudos

I am sorry, I didnt know about the screenshot rule...

Well, my model is there and bound to the component context. And the component is bound to the views context.

Former Member
0 Kudos

So far, so good. You might go into the debugger and

- check, if model creation succeded

- check, if data are filled into component controller

- check if data are transported into view controller

Armin