on 04-11-2007 2:19 PM
Hello SDN'ers
I have a context model node. When i execute the model , output node is filled with records (number of attributes).Let us say 3 records in Output node.
i am displaying this 3 records in a table UI . using a button action , adding 2 more records .
IPrivateMyView.IUpdEsParElement updParElement =
wdContext.nodeUpdEsPar().createUpdEsParElement(
new __Civga__Par_F1_Pnd());
WDCopyService.copyCorresponding(
wdContext.nodeEtb_Pnd_G0().getEtb_Pnd_G0ElementAt(i),
updParElement);
wdContext.nodeUpdEsPar().addElement(updParElement);
Now my table has 5 records(3 originaly from RFC call, 2 are added by the user).
<b>Is there a way to simply identify which records are added by the user.</b>
I have tried the IWDNodeElement,modelobject javadoc couldnt find any useful solution.
Baskaran,
There is no API support for this feature, however it's relatevly easy to implement this:
1. In custom coding area of component/view controller create the following filed:
//@@begin other
private Map originalEntries = new IdentityHashMap();
//@@end
2. After executing query and invalidating output node, scan output node element and populate <i>originalEntries</i>:
...
originalEntries.clear();
final IWDNode myOutput = wdContext.node<MyOutput>();
for (int i = myOutput.size() - 1; i>=0; i--)
originalEntries.put( myOutput.getElementAt(i).model(), "");
...
3. Do not add any new elements to <i>originalEntries</i> so later you may check whether or not element is added by user:
final IWDNodeElement myOutputElement = <..>;
final boolean isAddedByUser = ! originalEntries.containsKey( myOutputElement.model() );
Valery Silaev
SaM Solutions
Message was edited by:
Valery Silaev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Baskaran,
One way to achieve this is,
*You can have the external variable ex: arrayList to set the flag when a user
adds a particular row .
Regards,
Ramganesan K.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.