cancel
Showing results for 
Search instead for 
Did you mean: 

acces to the columns and values

Former Member
0 Kudos

Hi All,

all what I need ist to know how to iterate a java.util.List which actually contains a table.

Clearly how can I acces to the columns and values ?

I get at editing this list object by NWDS many datas but not my columns and its

values. I have to itreate the list object line by line according to table structure

in order to update some lines or remove them.

Where are the columns and the table content ?

This is an extract of my list object inside NWDS

"elementData=Object[1857](id=358)"

elementCount= 1689

[0]= Charactconfig (id=360)

allAttributesChanged= false

allRolesChanged= false

associatedModel= BasicRFCModel (id=471)

attributesChangedModeInverse= false

baseTypeData= JcoBaseTypeData (id=482)

baseTypeDescriptor= JcoBaseTypeDescriptor (id=486)

changedAttributes= null

changedRoles= null

connectionType= 1

descriptor= AiiModelClass$Descriptor (id=490)

elementIdxForFrontendName= HashMap (id=492)

generationInfo= GenerationInfo (id=496)

keySet= null

modCount= 0

modelInstanceId= null

rolesChangedModeInverse= false

scope= WDModelScopeType (id=498)

1]= Charactconfig (id=360)

2]= Charactconfig (id=360)

......

.....

Regards

sas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Following is the code to iterate a list



	  List list =  //your list
	  
	  Iterator itr = list.iterator();
	  
	  while (itr.hasNext())
	  {
		  Object obj = itr.next(); // type cast this to your respective type.
		  
	  }
	  

Regards

Ayyapparaj

Answers (3)

Answers (3)

Former Member
0 Kudos

Ayyapparaj the requirement is to not show each information which are not

important for some plants. All the data which will be shown is in this list.

For some plants must some information be invisible. This ist the goal.

In order to do that I have to remove 10 lines. This list is provided by RFC Function Modul.

Actually it is a table in the backend.

Regards

sas

Can you maybe access to my PC

Former Member
0 Kudos

Hi ,

I have the following information. What exactly is the type ?

public java.util.List get__Config_Tab() {

return (java.util.List)getRelatedModelObjects("__Config_Tab");

}

List list = xyzConfig.get__Config_Tab() ;

Debugger:

"list"= __Is_Charactconfig$__Is_Charactconfig_List (id=309)

associatedModel= BasicRFCModel (id=317)

baseList= JcoBaseList (id=328)

connectionType= 1

defaultScope= null

event= CMIObservableListEvent (id=333)

listeners= null

modelInstanceId= null

properties= XsdlElementProperties (id=336)

scope= WDModelScopeType (id=339)

Former Member
0 Kudos

Hi,

Most of the values of your list seem to be objects of different classes

Ex:baseList= JcoBaseList (id=328)

baseList contains an instance of JcoBaseList.

Could you explain why you need to extracting this data???

Regards

Ayyapparaj

Former Member
0 Kudos

Hello,

there is a type mismatch message permanently by typecasting, what is wrong?

sas

Former Member
0 Kudos

Hi,

Before type casting use the instanceOf to check and then do the type casting

Ex:


Object obj = itr.next(); // type cast this to your respective type.
		  if( obj instanceof String)
		  {
			  String str = (String)obj;
		  }

Regards

Ayyapparaj