cancel
Showing results for 
Search instead for 
Did you mean: 

SelectBox with data from Service Component

Former Member
0 Kudos

Hello,

I have a SelectBox using a Service Component, I tried both using a wizard-created SC and a custom made one.

With both, the Selectbox contains a last empty option which does not come from the SC. If selecting this empty option the running webdynpro crashes with 500.

java.lang.NullPointerException

at com.sap.tc.wd4vc.core.std.attributes.impl.provider.XGLEnumProvider.set(XGLEnumProvider.java:236)

at com.sap.tc.webdynpro.progmodel.context.DataAttributeInfo$CalculatedAccessor.set(DataAttributeInfo.java:736)

at com.sap.tc.webdynpro.progmodel.context.DataAttributeInfo.setAttributeValue(DataAttributeInfo.java:525)

at com.sap.tc.webdynpro.progmodel.context.NodeElement.wdSetObject(NodeElement.java:600)

at com.sap.tc.webdynpro.progmodel.context.MappedNodeElement.wdSetObject(MappedNodeElement.java:79)

I have no idea where this empty option may come from....

Other issues: the SC has two fields in a static data store:

"num" and "name" for the selectbox option's "value" and "text",

e.g.

num=1, name=foo

num=2, name=bar

if num is of type number, and your configuring the selectbox entrylist to use the dynamic SC, you cant select the num-field as its type is number and not text.

however you may select the num-field manually via the expressions dialog.

another issue:

it seems the static datastore may create multiple rows only if created via the SC-wizard which allows you to enter multiple static data rows.

if creating a SC manually you cant assign multiple data-rows, the static-store's fields may only assigned once with data, no rightclick-option to "add a new record"...

these little bugs make working productively with VC very exhausting ...

thanks for any hint regarding the bogus selectbox-SC-connection!

kai

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

the problems rise ...

if i select the combobox right at the beginning after page loading has completed, a proper combo list appears (still with the empty entry, which yields 500 if getting selected).

however after the form-inputs have changed (by selecting a row in a table) selecting the combobox instantly results in a 500er without even displaying the combo`s selection-list:

com.sap.tc.webdynpro.progmodel.context.ContextException: NodeElement(.Generic.DynamicDataNode) is invalid, either it has been removed from the context or the context has already been destroyed

at com.sap.tc.webdynpro.progmodel.context.NodeElement.assertValid(NodeElement.java:1274)

at com.sap.tc.webdynpro.progmodel.context.Paths.createAttributePointer(Paths.java:246)

at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.DropDownByKeyAdapter.setViewAndNodeElement(DropDownByKeyAdapter.java:206)

at com.sap.tc.webdynpro.clientserver.uielements.adaptmgr.URAdapterManager.getAdapterFor(URAdapterManager.java:348)

at com.sap.tc.webdynpro.clientserver.uielements.adaptmgr.URAdapterManager.getAdapterFor(URAdapterManager.java:124)

this whole dynamic-list feature seems to be hardcore-buggy.

any ideas?

kai

ThatSAPGuy
Advisor
Advisor
0 Kudos

Kai-

If you are planning to use the data from a Service Component to populate a drop down why dont you just create a dynamic dropdown? It will resolve all your problems, albeit via a work-around.

Cheers-

Atul

Former Member
0 Kudos

Kai,

Can you post some screenshots of your model so we (I) can understand better what it is that you have done?

Thanks,

Eyal

Former Member
0 Kudos

A screenshot wont help as I`m currently using a simple ComboBox with DynamicList Data.

The DynamicList is created via the VC wizard.

Atul, what do you mean with a "Dynamic DropDown"?

Is there any other DropDown type/element?

Thanks,

Kai

ThatSAPGuy
Advisor
Advisor
0 Kudos

Kai-

Right click on your form and choose Define Data. Then change the Control of a text field to Combo Box and click on Close. Then switch to the Layout perspective. Right click on the created drop down and choose Entry List. The wizard will then take you through creating a static or dynamic list. Creating a dynamic list through this wizard is similar to creating a list based on a service component

Cheers-

Atul

Former Member
0 Kudos

Hi Kai,

From your description, it seems to me you used the Service Component wizard to create a composite service that contains that data for your entry list, and then created a dynamic entry list for your drop down using the entry list wizard. If I've understood correctly, have you tried running the service component without an entry list, just to see that it returns the values you expect without exceptions? You can drop it into an empty model with in and out mappings identical to the ones you used in the entry list wizard. If this works fine, then the problem is in the entry list - if not, maybe it's in the composite service.

Screenshots of the in and out mappings of the entry list might be helpful in understanding what is going on.

Eyal