cancel
Showing results for 
Search instead for 
Did you mean: 

Drop Down By Key as Table Cell Editor

Former Member
0 Kudos

Hi Experts,

I got a problem with a DropDownByKey selector as table cell editor.

First of all I have an atribute Value as modifiableValueSet in a method like this:

public void initTimeTypes()
{
   IWDAttributeInfo catsRecordsAttribInfo = wdContext.nodeCatsRecordsFiltered().getNodeInfo().getAttribute("timeType");
   ISimpleTypeModifiable catsRecordsSimpleType = catsRecordsAttribInfo.getModifiableSimpleType();
   IModifiableSimpleValueSet catsRecordsSet = catsRecordsSimpleType.getSVServices().getModifiableSimpleValueSet();

   catsRecordsSet.clear();

   for (int i = 0; i<wdContext.nodeTimeTypes().size(); i++)
   {
	TimeType elem = wdContext.nodeTimeTypes().getTimeTypesElementAt(i).modelObject();			
	catsRecordsSet.put(elem.getTimeType(), elem.getTimeTypeText());
   }			
}

Now this attribute I can bind to an inputfield, and I will get an evs, or I bind this one to an DropDownByKey.

With the evs I can use it in forms AND tables but when I choose the DropDownByKey (I prefer this one) I can ONLY use it in forms.

Using the DropDownByKey I got an ClassCastException.

java.lang.ClassCastException

at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.TableColumn.getTable(TableColumn.java:2222)

at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.DropDownByKeyAdapter.getWidth(DropDownByKeyAdapter.java:624)

at com.sap.tc.ur.renderer.ie6.ComboBoxRenderer.render(ComboBoxRenderer.java:53)

at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:434)

at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:133)

at com.sap.tc.ur.renderer.ie6.SapTableCellRenderer.renderSapTableGenericCellFragment(SapTableCellRenderer.java:1143)

at com.sap.tc.ur.renderer.ie6.SapTableCellRenderer.renderSapTableCellFragment(SapTableCellRenderer.java:205)

.

.

.

Any Ideas?

By the Way, the system is NW04's SP 10

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member197348
Active Contributor
0 Kudos

Hi Florian,

It does not seem to be the problem in this part of code. The problem might be somewhere in the table. Just try this. Delete the column. Then deploy and run, if the problem is with this column only, it will go. Again add a new column[GroupedColumn], add dropDownByKey as TableCellEditor. Try it once again.

regards,

Siva

Former Member
0 Kudos

Hi Siva,

yes now I know the difference between [TableColumn - Column] and [Table Column - GroupedColumn].

It worked with your solution, but now I've got the Problem that my column for this DropDownByKey is just one part in a [TableColumnGroup - GroupedColumn]. Within this columngroup I can only add a [TableColumn - Column].

Any other ideas?

former_member197348
Active Contributor
0 Kudos

Hi Florian,

I could not exactly understand your problem. If your problem is adding [TableColumn - Column] is mandatory. In future versions you must use Grouped columns only not Columns. It is bettter to change all columns to GroupedColumns.

regards,

Siva

Former Member
0 Kudos

Hi Siva.

Yes, normally I will use the GroupedColumns within a Table, but when you want to hav something like this:

+Table

--ColumnGroup1

-


Column1

-


Column2

-


Column3

--ColumnGroup2

-


Column4

.

.

.

The Columns within these Groups must be [TableColumn - Column], the Element [TableColumn - GroupedColumn] ist not available here.

Now I think it's a bug, or maybe a feature from SAP

But thanx for your replies

Former Member
0 Kudos

Please open an OSS message. I think it is a bug in the TableColumn class. Obviously, the TableColumn implementation still assumes that its parent is alyways a Table which is not longer the case since introduction of table column groups.

Armin