on 12-27-2007 2:14 PM
Hi,
I am new to java webdynpro.So kindly solve my query.
I have 2 views named x and y,
In x i have a inputfield and in y i have a dropdown by key field.
I need to pass the value entered in the input field of view x to the dropdown field's listed values.How can i do that.
both fields are of different simple types.
Thanking you.
Arjun.G
check this pdf
and xxxxxxxxxxxxxxxxx
Bala
Edited by: Armin Reichert on Jan 1, 2008 3:43 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1. Copy context values from x-view to component controller or create the same in component controller.
2. map the x-view values to the component controller.
3. map the component controller values to the y-view.
Now you can access the x-view values in y-view.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
there is something called Context Mapping.
you will have to map the context from one one view to another using the component controller in between.
Search "context mapping" u'll get lot of stuff.
its a key concept so try to understand it carefully...
copy the context of first view and paste it in the context of the component controller.Repeat the same for the second view.
Double click on the name of your Component.
the diagram view will open up...
create a data link from each of your views to the component controller.
u will be prompted to map the context. Do it.
when you map the context from a view to the component controller, the view's mapped context loses existenece and shares that of the component controller...
after all this whatever context u mapped will be available in both the views as well as the component controller.
regards,
-Ag.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Arjun,
This is a problem of dynamically filling the list of the dropdown box.
Statically this can be done by creating a simple type and adding to its enumeration.
Dynamically, you do the same thing but you need to write code which goes as follows:
IWDAttributeInfo attributeInfo =
wdContext.getNodeInfo().getAttribute("DropDownFieldContextName");
// DropDownFieldContextName is a context attribute ( could be of string type also) that is bound to the dropdown box at design time.
ISimpleTypeModifiable objType = attributeInfo.getModifiableSimpleType();
IModifiableSimpleValueSet valueSet =
objType.getSVServices().getModifiableSimpleValueSet();
valueSet.put("key","value");
// value could be retreived from a context attribute that contains the string entered in the inputfield in the other view.
Regards,
Mayuresh
PS : xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Edited by: Armin Reichert on Jan 1, 2008 3:42 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arjun,
In x,y and Component Controller create context attribute (say db_key) of type dropdown by key field
(Open context tab of y-> right click on dropdown by key field -> Copy
paste this in context of x and Component Controller )
Map them using context mapping (open Navigation modeler -> link view to controller for both x and y -> map attributes)
Depending the value of the inputfield in view x set the db_key.
regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.