cancel
Showing results for 
Search instead for 
Did you mean: 

How to addRecord in Web Dynpro to Model node (Entity Service ref)

Former Member
0 Kudos
70

Hi,

1) I create Entity Service in CAF and try to write web dynpro Table UI for it.

2) is it possible with using Model Node? or I MUST use Value Node - Table must have possibilities for Add, Edit and Delete records.

Now I can edit, and delete records, but I can't add records with AddRecord method

Code below

public void NewTS( )

{

//@@begin NewTS()

IServiceFacade serviceFacade;

// Add new Model object TS

ATS ts = TSServiceProxy.create();

ts.setDate( new Date(System.currentTimeMillis()));

ts.getAspect().sendChanges();

serviceFacade = CAFServiceFactory.getServiceFacade(tsDefinition.class);

// try to addRecord to Controller context

IWDNodeElement n = wdContext.nodeTS().createElement(ts);

wdContext.nodeTS().addElement(n);

}

The error is: com.sap.caf.rt.exception.CAFBaseRuntimeException:

Aspect row is invalid for aspect: <Aspect name="TS" >

Thx for any help

View Entire Topic
Former Member
0 Kudos

Hi Nikolai,

I'm not sure here, but it seems the problem in typed access too.

Also possible that something wrong with nodes mapping.

Best regards,

Aliaksei.