on 12-26-2005 11:02 AM
Hi
Im making an application that generates xml with all the editable fields in the table that have been modified by the user.
The scenario is like this:
1. The table has 2 non-editable columns and 3 editiable columns(input fields), which initially contain values.
2. The user can modify any of these field in any row.
3. I need to check which fields have been modified by the user, generate an XML with the modified values and display the generated XML in another view.
Please let me know:
a. How I can check if the user has modified the fields.
Thanks,
Jack
hi,
Assuming that your XML file consists of fields as tag name.
you can add two child tags for your field names eg: <New Val> & <Old Val>
Before user modifies the data populate <Old Val> info...and after he finishes the modification on the event where you generate the XML populate the <New Val> tag information with latest values..
You can also use Document Object Model (DOM)for manipulating XML file.
NEx
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jack,
I am not sure if this will help you.Just give a try !!.
There are methods like isChanged,isChangedByClient available for nodeElements.
wdContext.node<yournode>().getElementAt(int i).isChanged
wdContext.node<yournode>().getElementAt(int i).isChangedByClient
You can use them to identify which element has been modified.
Here the drawback is that probably one element has more attributes and you do not know which attribute has been changed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jack,
If the values that are getting displayed by default in the table are retrieved from an RFC, then make a copy of the node i.e create a value node & copy the values from the model node to the value node. Finnaly, bind your table to this newly created value node.
Every time when you hit a button or trigger an action, compare the values of the corresponding attributes, i.e, the one on the value node and the one on the model node. This will help you to figure out if the value has been changed or not.
Hope this helps,
Bala
Please reward appropriate points.
Message was edited by: Bala Krishnan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
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.