Skip to Content
avatar image
Former Member

DropdownByKey UI element is giving Classcast exception

Hi

In my webdynpro view if i add "DropdownbyKey" UI element and the run the application,it is giving Classcast Exception.i am getting following error

-


The initial exception that caused the request to fail, was:

java.lang.ClassCastException

at com.sap.tc.webdynpro.progmodel.context.Paths.getAttributeInfoFor(Paths.java:202)

at com.sap.tc.webdynpro.clientimpl.html.uielib.standard.uradapter.DropDownByKeyAdapter.setViewAndNodeElement(DropDownByKeyAdapter.java:240)

at com.sap.tc.webdynpro.clientimpl.html.uielements.adaptmgr.URAdapterManager.getAdapterFor(URAdapterManager.java:231)

at com.sap.tc.webdynpro.clientimpl.html.uielements.adaptmgr.URAdapterManager.getAdapterFor(URAdapterManager.java:64)

at com.sap.tc.webdynpro.clientimpl.html.uielib.standard.uradapter.FlowLayoutAdapter$Items.getControl(FlowLayoutAdapter.java:318)

... 39 more

-


Please help

thanks

Prasad

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Nov 16, 2006 at 02:20 AM

    Hi Sriram,

    You need to bind the property "selectedKey" for the DropdownByKey UIElement

    http://help.sap.com/saphelp_nw04/helpdata/en/08/13dbfb6e779743bb2ca641ebcb3411/frameset.htm

    Regards, Anilkumar

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 16, 2006 at 04:49 AM

    Hi,

    1. create Simple Type and in enumeration tab add all the velues need to display in a dropdown.

    2. Create on context element(value attribute) and bind with that simple type.

    3. Create DropDownByKey UI element Properties -->selected key property bind with context attribute which you created.

    Regards,

    Saraswathi.

    Add comment
    10|10000 characters needed characters exceeded