<p:datatable> with variable column amount

Asked

Viewed 450 times

1

Good night.

Can anyone tell if it is possible (and how to do it) to create a datatable of the first faces whose column number is variable?

For example, imagine two cases, A and B. In set A I would create 3 columns. In B, I would create only 2.

Grateful!

1 answer

2

The primefaces have the component <p:columns>.

Follow the link to the showcase here

  • Rafael, very short answers or only with links are usually a little poorly seen by the community, after all the information may not add much and the link may cease to exist. If possible, I suggest adding some more information, perhaps a small example with code to illustrate the use of the tag columns.

  • Thanks for the comment, it helped me a lot! :)

  • @utluiz All right, as the link is the official showcase of the first faces and there contains an example thought to be unnecessary a new example.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.