cancel
Showing results for 
Search instead for 
Did you mean: 

How to access Dictionary Structure in web dynpro(Where are you GS?) ?

Former Member
0 Kudos

i had made one person Structure in Local dictionary.

i had already this type of value node in my context.

now i want to make an object of that type by code


       IPersonElement person =wdThis.wdGetContext().createPersonElement();

Then it is giving me error <i><u>type can not be resolved</u></i>.

Please Help Me....

Regards

Sunny.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I am learning WebDynpro from tutorials i have

in that once they said me to create three views.

1.Start View

2.Table View.

3.Detail View.

In start view 's context there are four elements

Variable Name Type

1. First_Name String

2.Last_name String

3.Date_Begin Date

4.Date_End Date

then In Controller 's Context I had also created all above elements with same type.

then i mapped all views with controller 's context.

start view 's all elements i map with contoller 's context.

then i had created one structure in local data dictionary.

Name of Structure is Person.

and all above four attributes are also there.

Now i create one value node in Table View type of that is person.

now i had also created binding of table with first_name and last_name.

then in coding

<i>

Public Void onPlugfromStartView( )

{

//@@begin onPlugfromStartView(ServerEvent)

String firstname =

wdThis.wdGetExc_UIController().wdGetContext().

currentContextElement().getCmpCtx_firstname();

String lastname =

wdThis.wdGetExc_UIController().wdGetContext().

currentContextElement().getCmpCtx_lastname();

Date date_begin =

wdThis.wdGetExc_UIController().wdGetContext().

currentContextElement().getCmpCtx_dateBegin();

Date date_end =

wdThis.wdGetExc_UIController().wdGetContext().

currentContextElement().getCmpCtx_dateEnd();

IPersonElement person =

wdThis.wdGetContext().createPersonElement();

<u><b>Above line is giving me Error that person can not be resolved</b></u>

person.setFIRSTNAME(firstname);

person.setLASTNAME(lastname);

person.setDATE_BEGIN(date_begin);

person.setDATE_END(date_end);

wdThis.wdGetContext().nodePerson().addElement(person);

//@@end

}

</i>

Please Help Me Sir.

Former Member
0 Kudos

Hi..

Try this ..

Instead of tht..

person.setFIRSTNAME(wdcontext.nodeelement.getfirstname);

person.setLASTNAME(wdcontext.nodeelement.getlastname);

person.setDATE_BEGIN(wdcontext.nodeelement.getdate_begin);

person.setDATE_END(wdcontext.nodeelement.getdate_end);

wdThis.wdGetContext().nodePerson().addElement(person);

//@@end

Former Member
0 Kudos

It is solved.

Sorry i had to include

import try1.comp1.wdp.IPrivateTableView.IPersonElement;

in my imports.

Thank You very much for your suggetions.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi..

Can u explain in detail?

Urs GS