on 05-19-2006 7:28 PM
I want to know how I can bind a set of inputfields, in a form view, to 2 different model nodes ?
<u>example:</u>
Im working with 2 adaptional RFC, both working, in my Custom Context.
Ztest_Search
Ztest_Update
In my ResultView I have 2 Model nodes (one for each RFC) I show a set of inputfields in a form view, binded to the Ztest_Search_output of Ztest_Search. This works.
now I want to update the changes, but I can't find the ways of binding the same inputfields to my other Model node (Ztest_Update) in the context of ResultView.
Note: If I create a duplicate set of inputfields , one for Ztest_Search binded to the Ztest_Update_output and the other to the Ztest_Update_Input Works. But I wanna avoid this duplicated set of inputfields.
Thx
Rodrigo,
If I understood correctly, your problem is to get the data from the input fields which are bound to a
model node, Ztest_Search_output and set it to the model node of another RFC, Ztest_Update.
This can be done by getting the suitable values from the model attributes of Ztest_Search_output
and setting it to Ztest_Update.
<b>/**
* valueOne, valueTwo are the name of the model
* attributes that are bound to the Input fields.
*/</b>
String firstValue = wdContext.currentZtest_Search_outputElement
().get<valueOne>;
String secondValue = wdContext.currentZtest_Search_outputElement
().get<valueTwo>;
Ztest_Update_Input update = new Ztest_Update_Input();
wdContext.nodeZtest_Update_Input().bind(update);
<b>/*
*<b>Zstructure is the structure of the model node under
*Ztest_Update_Input to which the values have to be
*updated.</b>
*/</b>
ZStructure structure = new ZStruture();
structure.setValueOne(valueOne);
structure.setValueTwo(valueTwo);
update.addZStructure(structure);
try
{
update.execute();
}
catch (Exception ex)
{
wdComponentAPI.getMessageManager().reportException(ex.getMessage(), false);
}
wdContext.nodeZtest_Update_Output().invalidate();
Bala
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 | |
10 | |
10 | |
9 | |
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.