cancel
Showing results for 
Search instead for 
Did you mean: 

DropDownbox Value Access

Former Member
0 Kudos

Hi,

I am creating a webdynpro application where i have a dropdownbox in a view with some values. I have a local variable which receives the value selected from the drop down. How can i pass this value to the Component Controller Variable? Does anyone have code samples for passing value from a local context variable to the component controller variable?

Regards,

Divya

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Divya ,

You could access the Drop Down Selected and directly pass it to Context Variable as below

wdContext.currentContextElement().setW2Year(wdContext.nodeW2Node().getLeadSelection(

If u feel this helped u , xxxxxxxxxxx.

Edited by: Armin Reichert on Dec 19, 2007 8:55 PM

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Divya,

Write a function in comp controller taking one parameter. From view u can call comp controller function by passing that value.

Former Member
0 Kudos

Hi,

How can i pass this value to the Component Controller Variable?

Create the variable in the component controller and then map to the view.

Does anyone have code samples for passing value from a local context variable to the component controller variable?

Todo the above mentioned you dont need any code.

Ex:

Component Controller -> View Controller -> View

Attribute x Mapped-> Attribute x -> Bind to the UI Element.

Regards

Ayyapparaj

Former Member
0 Kudos

Hi,

You can do it in two ways:

1) You can map a context attribute to your view via Component Controller. Set the value for this attribute and access it in your Component Controller.

2) You can set a context attribute of Component Controller using the following code from your view.

wdThis.wdGet<Controller Name>Controller().wdGetContext().currentContextElement().set<Attr Name>();

But for this also, your view must be mapped to the Component controller, not necessarily the attribute which you want to set.

thanks & regards,

Manoj

Former Member
0 Kudos

Hi Divya

1) Bind the component controller context into the view [say Sample is the name of context node]

2) now wdContext.currentSampleElement.set<your attribute vallue>(your dropdown value)

Best Regards

Chaitanya.A