cancel
Showing results for 
Search instead for 
Did you mean: 

Data is not getting displayed into a table

Former Member
0 Kudos

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 );
    }

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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(""))

Former Member
0 Kudos

After cardinality there is another property called "selection"...wat is its use exactly..and is there any relation between cardinality and selection

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Hi Padma

You said you have context structure like this

Personal

-


Name

-


Firstname

-


Email

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

Former Member
0 Kudos

Hi,

check the condition like this.Because the previous condition can't satisfy ur logic.

String tblName=wdThis.wdGetUICompController().wdGetContext().currentPersonalElement().getName();
	
    if((tblName!=null)||(tblName.equals("")))
   
    {
		wdContext.currentPersonalElement().setName(tblName);
    }