on 12-12-2005 2:17 PM
Hi all,
I have a serious problem with the table UI.
In screen 1 ,I have a table where I multiselect the table rows and press "next Button" this action leads to the Screen 2, where a summary of the previously selected rows is displayed..
Here I get a blank row as my first row along with the selected rows.
This is some wht URGENT...
Thanks in advance
The context node of the controller to which the second view controller is bound, change the cardinality of it to 0...n. It might be 1...n.
Thus by default it is creating 1 element in the context that is ur blank row...so change to 0....n then min number of elements = 0. So you will not get Blank Row.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi gopi
when you get element from the table the indexing is from 1,2,3etc. and not from 0,1,2.so the line get element at index=1 retrieves the first element ,get element at index=2 retrieves the second element and so on.
use one more variable say int k=1 to retrieve elements and use i for count.
instead of this line
element.setDelivery(wdContext.nodeHeader_Data().getHeader_DataElementAt(i).getDeliv_Numb());
use k to get element say as follows
element.setDelivery(wdContext.nodeHeader_Data().getHeader_DataElementAt(k).getDeliv_Numb());
the modified code may be
for (int i = 0,int k=1; i < size; i+,k+) {
if (wdContext.nodeHeader_Data().isMultiSelected(i) || i == leadSelection) {
element = wdContext.nodeItemdata().createItemdataElement(new Bapishipmentitem());
element.setDelivery(wdContext.nodeHeader_Data().getHeader_DataElementAt(k).getDeliv_Numb());
wdContext.nodeItemdata().addElement(element);
}
}
regards
saravana.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You must have selected the cardinality of the node as 1..n .. Try making it 0..n and see if its suits your requirements..
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi gopi,
Can you provide the code you used to populate the values in the table
Regards
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rohit,Here is the code
for (int i = 0; i < size; i++) {
if (wdContext.nodeHeader_Data().isMultiSelected(i) || i == leadSelection) {
element = wdContext.nodeItemdata().createItemdataElement(new Bapishipmentitem());
element.setDelivery(wdContext.nodeHeader_Data().getHeader_DataElementAt(i).getDeliv_Numb());
wdContext.nodeItemdata().addElement(element);
}
}
Thanks,
HI GOPI
Try this out.Loop backwards to avoid index problem
int n = wdContext.nodeHeader_Data().size();
int leadSelected = wdContext.nodeHeader_Data().getLeadSelection();
// loop backwards to avoid index troubles
for (int i = n - 1; i >= 0; --i)
{
if (wdContext.nodeHeader_Data().isMultiSelected(i) || leadSelected == i)
{
element = wdContext.nodeItemdata().createItemdataElement(new Bapishipmentitem());
element.setDelivery(wdContext.nodeHeader_Data().getHeader_DataElementAt(i).getDeliv_Numb());
wdContext.nodeItemdata().addElement(element);
}
}
let me know if it works,
hope it help u better,
Regards,
Arun
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.