on 12-18-2007 8:09 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Divya,
Write a function in comp controller taking one parameter. From view u can call comp controller function by passing that value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.