• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Dynamically generate jsf components

 
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am a beginner in java programming. I query a database and display them in a fixed set of jsf components in a jsp page.
Basically its a 8 rows table and 3 columns table. And hence I have displayed as below simply.
Each row had only 3 columns to display as below.


Now I have something new to learn. for each row in a table, there might be 4 or 8 (dynamic number) of rows and 3 columns for each row (inside) to be displayed. How to display them. Can any one show me a very simple example? I would really appreciate any help as I am getting my hands in java after a long time. Thanks.

 
Gopu Akraju
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Since I didn't get any resonse, may be my query is not very clear.
Right now , I query a database and displau them as jsf components as below. (8 rows and 3 columns)
But my new query each row might contain either 1 set of 3 columns or 4 sets of 3 columns. How to dynamically include tehse data to be displayed? A small example would be very very helpful. Thanks again.
 
Gopu Akraju
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My list of item to be displayed in in an arrayList. I tried datable as bleow:

Initially I have just one set data for each row to be displayed as below:
lane2A is an arraylist with just one item.


now lane2A might have more than 1 tem and still items in an arraylist
I am trying as follows but the list is displayed horizontally as



How to display a horizontal list as


Thanks.
 
Gopu Akraju
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there anyway that I can display my list horizontally? Thanks.

I also need some help in binding these beans..Thanks.
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Add a property layout="pageDirection" to h:selectOneMenu tag.
 
Gopu Akraju
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ravi,
Thanks for your response. But I want to just display the table in a dataTable and also have to bind these beans for further manipumation.
I also tried dataList as below:


The results are still displayed as ".[HI, BYE] "
Regards
 
I am not a spy. Definitely. Definitely not a spy. Not me. No way. But this tiny ad ...
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic