cancel
Showing results for 
Search instead for 
Did you mean: 

Error on binding context attribute dinamically

Former Member
0 Kudos

This loop get each element of the node and select one element:


for( int i=0; i< wdContext.nodeS_Requisicaocompra_1().size(); i++ ){
               wdContext.nodeS_Requisicaocompra_1().setLeadSelection( i );
               elem = wdContext.currentS_Requisicaocompra_1Element();
}

If I display the element value it happen with sucessfully:


               textView = (IWDTextView) view.createElement(IWDTextView.class);
               textView.setText( elem.getTxz01() );
               itens.addChild(textView);	

But I need to bind the values and I doesn´t work, witch is the correct way to bind ?


                textView = (IWDTextView) view.createElement(IWDTextView.class);
                textView.bindText(  wdContext.nodeS_Requisicaocompra_1().getNodeInfo().getAttribute( "Txz01" ) );
                itens.addChild(textView);		

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Can u try as below?

textView = (IWDTextView) view.createElement(IWDTextView.class);
 textView.bindText("nodeS_Requisicaocompra_1.Txz01" );
itens.addChild(textView);

For more help:

http://help.sap.com/saphelp_NW70EHP1/helpdata/en/96/89a74052033713e10000000a155106/content.htm

Regards,

Charan

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi expert,

Better you ahve put all code in firstTime in doModify method...because doModify run all time while has happened any event so same Id cant created in all atimes.

Thanks

Jati

Former Member
0 Kudos

If your intent is to bind TextViews to the elements of a context node: this is not possible. You have to use a Table, RowRepeater or similar context-driven UI element to do that.

What is your intent?

Armin

Former Member
0 Kudos

Why not bind directly?

You can use visible/invisible to show/hide

You can create an (almost) duplicate node (cardinality 1..1) to store selected values

former_member185086
Active Contributor
0 Kudos

Hi

Please go throuth form this [doc|;

Best Regards

Satish Kumar