on 2007 Oct 27 5:49 AM
Hi experts,
I have small problem in tables. I created one table with 2 fields.
1.Input Field.(Amount)
2. Text View Field.(Tax)
I will enter some amount in input field and i need to calculate tax and display in text view field. I created onAction() for input field.
Problem is:
1. Lead selection is always in first row, i am not able find the input field value for calculation.
2. How to find the input field value in onAction () method.
3. Any other setting i need to do ..
Regards,
Sunil
Use the (implicit) event parameter "nodeElement" to identify the row where the action was triggered. Either define a parameter mapping using the view designer tool (Outline view, right-click on InputField -> Parameter Mapping), or with a line of code like
wdDoModifyView(...)
{
if (firstTime)
{
IWDInputField editor = (IWDInputField) view.getElement("inputfield_ID");
editor.mappingOfOnAction().addSourceMapping("nodeElement", "row");
}
}
"row" must be an action parameter of type I<DataSourceNode>Element or IWDNodeElement.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sunil,
You can create an action which calculates and sets 'Tax' value based on the input field value.And bind this action to onEnter event of the input field.
In that action, you can get the input field value by
String amt=wdContext.node<tableNode>.current<tableNode>Element().get<contextnamebindToInputField>();
<b>If this current<tableNode>Element() to be worked for the selected row,
set the tables 'compatability mode' property from 'nw04s' to 'auto'.</b>
otherwise leadselection will always give first row.
Regards
smitha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
67 | |
11 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.