cancel
Showing results for 
Search instead for 
Did you mean: 

The UI element of the view will be desplaying in desable mode

Former Member
0 Kudos

Hi,

I have developed an application which is in the SAP Help Creating an Email Client Using Web Dynpro and Web Services.

Followed as it is steps in that example.

it has deployed without any errors,

but when we run the application its displaying all the UI Elements in disable mode.

could any one help on this,

Thanks & Regards,

Ravinder Jilla.

Accepted Solutions (1)

Accepted Solutions (1)

venkatakalyan_karanam
Active Contributor
0 Kudos

Hi

The supply functions generally used when your node is non single ton. The input field must be bind to a cntext attr of a node whose cardinality is 1:1 or 1:n .Try to change the cardinality of the node.

Do one thing create some Attributes under the root context and bind them to input field.Get the data from these context attributes when ever you require the values in your program.

Regards

Kalyan

Answers (6)

Answers (6)

Former Member
0 Kudos

Got resolved ,

Thanks.

Former Member
0 Kudos

HI Ravinder

As you are using Web services in your application, i think you are directly binding UI elements to model node.

As Web services do not contain any metadata. All metadata is populated at run time when you deploy it there will be no data and node is disabled. you have to execute the web service to get data but due to disabled UI element you are not able to do it.

So try creating a value node of same context and map it syntactically with your model node to get data.

you can set the cardinality of value node to 1:n or 1:1 depends on how you are displaying data at run time.

If UI elements are displaying single value then keep it 1:1 and no need to create the element.

if data is to repeat in UI elements like table etc.then create node element as i specified in above post.

Mandeep Virk

Former Member
0 Kudos

Change the carinality and check the mapping and run .It will work .

Former Member
0 Kudos

Hi,

This error usually comes when context node linked to UI has cardinality 0..n and currently there is no element in the node.Hence data can not be written to it. So, all the UI elements are displayed in disabled mode.

Try changing cardinality of node, linked to UI, to 1..n.

Thanks & Regards,

Apurva

Former Member
0 Kudos

HI

1. Click to context node of whose node attribute is bound to UI element.

2. Go to properties of context node.

3. There will be supply function in the node properties.

4. Click on right blank side and click on appeared button to create supply function for same node

5. name of node will automatically generated. click Ok to finish.

6. go to implementation and go to supply function

7. Write following code line in that function

 node.addElement(node.create<ContextNode>);

this is same context node for which you you are creating supply function.

This will enable your UI element which is disabled coz no element was created yet.

Mandeep Virk

Former Member
0 Kudos

Hi mandeep,

I have added the that supply function but if i give as create my context node then its giving error , can't resove.

even its asking for parameters.

could you please give in detail.

Thanks & Regards,

Ravinder Jilla.

Former Member
0 Kudos

Hi

In supply function you are itself creating an element of node. no need to create it again.

By writing only following code you can create a node element which can enable all UI elements.


// In Supply function
node.addElement(node.create<your node>Element()); 

Other wise you can also do this in wdDoInit() of view controller


IPrivateView<your View>.I<your node>Element() element = wdContext.create<your node> element();
wdContext.node<your node>().addElement ( element );

this will create an element of your node and enable UI element bound to it.

Try the latter one and let me know the status

Mandeep Virk

Former Member
0 Kudos

Hi,

Did you create the elements of the node whose attributes are mapped to the UI elements in your application? If this is ok then chack the enabled property for your UI elements.

Hope this helps.

thanks & regards,

Manoj