cancel
Showing results for 
Search instead for 
Did you mean: 

Tutorial The concept of componentization in web dynpro java...

Former Member
0 Kudos

Hello there,

I try to complete this tutorial but i have a problem, maybe this tutorial is a little bit incomplete.

in page 18 have a code with this line:

pUsage.createComponent(wdContext.currentSelectedPersonElement().getPerson());

but in my app there aren't this code: wdContext.currentSelectedPersonElement().

I believe, this Element i need to declare in a Context Attribute of RootComponent.

In the Page 19 there something like the above situation:

The value of selectedKey of RadioButton is SelectedPerson.Person, probably this value is an attribute mapping to the SelectedPerson.Person of RootComponent.

In the tutorial, don't have how declare this attribute and i don't now how declare it.

Can anyone help me.

Marcos Brandão.

Accepted Solutions (1)

Accepted Solutions (1)

former_member181883
Active Participant
0 Kudos

Hi Marcos

Sorry, this was an omission on my part.

The exercise document has been corrected and is available at the link below

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30d56578-f7e5-2a10-5ab5-8afc55d2e0e8">https://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30d56578-f7e5-2a10-5ab5-8afc55d2e0e8</a>

Regards

Chris W

Former Member
0 Kudos

Hi Chris,

Thank's for your correction. I guess this correct is very usefull for new developers.

Regards

Marcos.

Answers (5)

Answers (5)

Former Member
0 Kudos

Hello there,

Thanks for reply...

Well...

My english isn't so good, and didn't express very well., sorry...

i know how create the attribute in root context, the problem is what the type of the attribute Person.

Sorry, i forgot the link of tutorial:

[The concept of componentization in web dynpro for java|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30d56578-f7e5-2a10-5ab5-8afc55d2e0e8]

Thanks..

Former Member
0 Kudos

Hi,

I think it should be of String Type holding the package of Component to be created, like

g_Usage.createComponent("com.sap.wd.childdc1comp.ChldDC1Comp");

I had done this simillar functionality using the following document which has step by step procedure of Componentization.

[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0409d83-5ed5-2910-ef91-e41da6d5b8b4]

Regards

Raghu

Former Member
0 Kudos

Thanks Raghu,

I am goint to try this. Propably is right, i guess when the event of radio button is triggered, the value of Person is the string value of keySelected of Radio Button.

Thanks a lot...

Marcos

Former Member
0 Kudos

hi!

create a node and then create attribute and set the cardinality.

here in this link u can find some fundamentals about componentizationhttps://www.sdn.sap.com/irj/sdn/nw-wdjava?rid=/library/uuid/f727d100-0801-0010-4cbd-b0ad5c161945

Former Member
0 Kudos

Hi,

What is the document that you are following, can u provide the link for that. The following code is some thing related to componentization

pUsage.createComponent(wdContext.currentSelectedPersonElement().getPerson());

But for this, what you guess is correct that you need to have a attribute Person under SelectedPerson Node.

Check in the document as to Person attribute is of which type and also what is the data that you are storing in that Attribute?

Regards

Raghu

Former Member
0 Kudos

Hi,

to create SelectedPerson.Person follow the below procedure,

under rootcontext create a value node with name "SelectedPerson" cardinality 1..1

now under the "SelectedPerson" node create attribute with name "Person".

bind "Person" to selectedKey of RadioButton.

hope it clear !

Regards,

ramesh

former_member192434
Active Contributor
0 Kudos

Hi Marco,

To declar attribute and Node, go to your view/component layout.. there you can see context tab. click on it you will get Text area kind of thing where you can find Context.->Right Click>New-->Value Attribute

I hope u get it

Thanks

Anup