aspose file tools*
The moose likes JSF and the fly likes Probem with datatable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Probem with datatable" Watch "Probem with datatable" New topic
Author

Probem with datatable

Meghana Reddy
Ranch Hand

Joined: Jan 29, 2002
Posts: 76
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


Meghana Reddy
Kavita Tipnis
Ranch Hand

Joined: Sep 21, 2008
Posts: 177
Nothing is added in the list to show in the datatable
Meghana Reddy
Ranch Hand

Joined: Jan 29, 2002
Posts: 76
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

Joined: Sep 21, 2008
Posts: 177
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:
>
 
 
subject: Probem with datatable