cancel
Showing results for 
Search instead for 
Did you mean: 

Storing data from complex context in WebDynpor

Former Member
0 Kudos

Hi,

I'm writting Dynpro application which uses very big, complex context [many recursive nodes, many value attributes etc] and I need some "simple" way of storing this data in relational database. Of course I can use OpenSQL but it will mean thousands of lines of code for all CRUD. Is there any utility like this in Composite Applications (generating crud methodes for dictionary) or something else that will simplify this task?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi

good

create a single view with Text area,a button and a LinkTOUrl UI element. Write the following code on click of button. and set the refrence property of LinktoUrl equals to Url.

Note : Here Doc and Url are the value attribute of string type.

public void onActionConvert(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionConvert(ServerEvent)

final String formattedStr = wdContext.currentContextElement().getDoc();

try

{

final IWDCachedWebResource resource = WDWebResource.getWebResource

(

formattedStr.getBytes("UTF-8"), WDWebResourceType.DOC

);

resource.setResourceName("WordDoc.doc");

wdContext.currentContextElement().setUrl( resource.getAbsoluteURL() );

}

catch (final Exception ex)

{

wdComponentAPI.getMessageManager().reportException( new WDNonFatalException(ex), false );

}

//@@end

}

thanks

mrutyun^

Former Member
0 Kudos

Ok, but:

1. I need to store data in relational database not in file

2. I need a way to store but also restore this data from database

3. This solution dosen't help mi with recursive nodes

But thanks for trying