Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Probem with datatable

 
Meghana Reddy
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've a managed bean called Customer which has a list of credit cards.


I'm trying to display the list of credit cards a customer might have in a datatable as follows in my creditcard.jsp




CreditCard.java is as follows:



My faces-config.xml entry for the managedbean is:



After I execute the JSP, the data table doesnt display any of the inputTexts and just shows up as follows:



Where am I doing wrong?

Please help

Thanks
Meghana

 
Kavita Tipnis
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing is added in the list to show in the datatable
 
Meghana Reddy
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kavitha,

This screen shows up in the customer registration process.

As the customer is registering afresh, initially we dont have any of the customer's credit cards to show.

As the customer registration process progresses, this screen shows up where the customer will enter his credit card information.
So, is the data table not a good fit for this scenario?

Can you please explain? Is there no way to display a data table with empty rows in it?

Thanks
Meghana
 
Kavita Tipnis
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use UIOutputText and UIInputText components to render conditionally in a UIColumn component in a datatable.
For instance, if there are no records in a datatable , you render the input text box to allow the user to enter information
and if there are records then depending on your requirements , you may want to display the data in a output text component.
Example:
>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic