on 08-06-2007 5:55 AM
Hi,
here i used 2 views
Personal info view :--user fill the details in this and clicks go...Then the user entered details should be displayed into a table view...
In context of personalinfoView i took a node as "personal" and added the details as attributes to personal node,and while mapping i mapped Controller data with PersonalinfoView...
No i have to retrive data from controller component and i have to display in table
But the table is getting displayed but no values are getting displayed..
the code for getting data from component controller i used in inplug method od table is
String tblName=wdThis.wdGetUICompController().wdGetContext().currentPersonalElement().getName();
if((tblName!=null)&& tblName.equals(""))
{
wdContext.currentPersonalElement().setName(tblName);
}
String tblFirstName= wdThis.wdGetUICompController().wdGetContext().currentPersonalElement().getFirstName();
if(tblFirstName!=null && tblFirstName.equals( ""))
{
wdContext.currentPersonalElement().setFirstName(tblFirstName);
}
String tblEmail=wdThis.wdGetUICompController().wdGetContext().currentPersonalElement().getEmail();
if(tblEmail!=null && tblEmail.equals(""))
{
wdContext.currentPersonalElement().setEmail(tblEmail);
}
String tblCountry=wdThis.wdGetUICompController().wdGetContext().currentPersonalElement().getCountry();
if(tblCountry!=null && tblCountry.equals(""))
{
wdContext.currentPersonalElement().setCountry(tblCountry );
}
String tblGender=wdThis.wdGetUICompController().wdGetContext().currentPersonalElement().getGender();
if(tblGender!=null && tblGender.equals(""))
{
wdContext.currentPersonalElement().setGender(tblGender);
}
String tblSports=wdThis.wdGetUICompController().wdGetContext().currentPersonalElement().getSports();
if(tblSports!=null && tblSports.equals( ""))
{
wdContext.currentPersonalElement().setSports(tblSports );
}
String tblOthers=wdThis.wdGetUICompController().wdGetContext().currentPersonalElement().getOtherinterests();
if(tblOthers!=null && tblOthers.equals(""))
{
wdContext.currentPersonalElement().setOtherinterests(tblOthers );
}
Hi,
you set the cardinality of the node is 1..n or 0..n
you just check the condition like this
if((tabname!=null)||(tabname.equals(""))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Padma
You said you have context structure like this
Personal
-
Name
-
Firstname
-
if you set personal node's cardinality 1..1 it can hold only one person's Information.i.e. personal node has only one element.
if you set the personal node's cardinality 0..n it can hold 0 to N nor of person's data.i.e. personal node has 0 to n elements
If Personal node has cardinality 0..n and it has 10 elements holding 10 person's data, and you are displaying it in a table control. If we set the selection property single only one row can be selected at a time. if it is Multi user can select multiple rows from the table.
Now in your case, there is no need to take cardinality as 0..n. Because you are holding information of one person, so the cardinality is 1..1
Regards
Abhimanyu L
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.