on 05-18-2005 4:21 AM
Hello All,
Can anyone advise on how to acheieve the above ? I am trying to read in a text file (CSV) and have the contents populated to the respective UI elements in a table. Any help is greatly appreciated.
from
Kwok Wei
Hi,
Let us consider you have list of names(Seperated by delimeter) in a text file and you want to display in a table.
1. Create Context Node "Names" and context attribute "Name"
2. Create Table and bind to the above context.
3.Write the following code in the "Init method.
try{
FileReader f =new FileReader("");
BufferedReader r=new BufferedReader(f);
String names=r.readLine();
Vector Names=new Vector();
// Use Tokenizer and store all the names i a vector//
for(int i=0;i<Names.size();i++){
IPrivate<<VieName>>.INameElement ele=wdContext.createNameElement();
ele.set<<Name>>( Names.get(i).toString());
wdContext.NodeName().addElement(ele);
}
Regards, Anilkumar
Message was edited by: Anilkumar Vippagunta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Example
How you want to name the Node and attribute is upto you only.
NodeName : Employee
AttributeName :Name
If you create ValueNode by default Cardinality will be 0..n and selection will be 0..1
So you can keep the default values.
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
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.