• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Can't set invisible border for Table inside P:dataTable.

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JSF web-app.

Border is still visible. I think it depends on <p:dataTable item.
 
Saloon Keeper
Posts: 25466
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why create a brute-force HTML table element when the JSF dataTable tag renders as a table anyway? You'll just end up with a table inside another table.

To set border attributes for a dataTable or panelGrid JSF element, use the CSS "style=" or "styleClass=" attribute on the dataTable or panelGrid element itself.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Javid Shikhiyev

you should remove that border attribute from table element and try some other jsf tag lib element instead of table element from HTML.
Please try some inbuilt tag of your jsf taglib.
 
David Scholl
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Navdeep Singh kanwal wrote:Hi Javid Shikhiyev

you should remove that border attribute from table element and try some other jsf tag lib element instead of table element from HTML.
Please try some inbuilt tag of your jsf taglib.



Hi, Navdeep Singh kanwal
I'm sorry for my mistake. I wanted to write that border = '0' explicitly.
Ok, but which inbuilt tag to use in this case? These "table"s are for design - dividing fileds in the jsf pages.
 
Navdeep Singh kanwal
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
show some picture of your datatable output here.
if you are looking for grouping then try this

http://www.primefaces.org/showcase/ui/datatableGrouping.jsf
 
David Scholl
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Navdeep Singh kanwal wrote:show some picture of your datatable output here.
if you are looking for grouping then try this

http://www.primefaces.org/showcase/ui/datatableGrouping.jsf



Thanks. But i must use <img > and <a > inside these cells. I couldn't use it.

 
Tim Holloway
Saloon Keeper
Posts: 25466
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Javid Shikhiyev wrote:

Thanks. But i must use <img > and <a > inside these cells. I couldn't use it.



No you mustn't. Use their JSF counterparts: <h:graphicImage> and <h:outputLink>. They are JSF-aware and will properly register in the container layout process, which is something that brute-force HTML can't guarantee.
 
David Scholl
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:

Javid Shikhiyev wrote:
Thanks. But i must use <img > and <a > inside these cells. I couldn't use it.


No you mustn't. Use their JSF counterparts: <h:graphicImage> and <h:outputLink>. They are JSF-aware and will properly register in the container layout process, which is something that brute-force HTML can't guarantee.


but i couldn't use these too. it doesn't show image or link. may be, i need some tag-containers?
 
Tim Holloway
Saloon Keeper
Posts: 25466
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Javid Shikhiyev wrote:
but i couldn't use these too. it doesn't show image or link. may be, i need some tag-containers?



Well, you need the datatable to be wrapped in view and form tags.
 
David Scholl
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:

Javid Shikhiyev wrote:
but i couldn't use these too. it doesn't show image or link. may be, i need some tag-containers?


Well, you need the datatable to be wrapped in view and form tags.



Like that? It doesn't work.

 
Tim Holloway
Saloon Keeper
Posts: 25466
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try using the "h:graphicImage" tag instead of "p:graphicImage". If it still doesn't work, View Page Source in your browser. The graphicImage tag should be generating an IMG HTML tag with a URL. Try entering that URL in your browser's navigation bar and see if the image displays.

I'm not familiar with the "p" tagset, so you may need to check their documentation.
 
David Scholl
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:Try using the "h:graphicImage" tag instead of "p:graphicImage". If it still doesn't work, View Page Source in your browser. The graphicImage tag should be generating an IMG HTML tag with a URL. Try entering that URL in your browser's navigation bar and see if the image displays.
I'm not familiar with the "p" tagset, so you may need to check their documentation.


there isn't "img" tag in html-source in both cases (h:graphicImage and p:graphicImage)
i didn't find a solution with "h:" tags. there aren't the tags: "h:row", "h:columnGroup"
 
Tim Holloway
Saloon Keeper
Posts: 25466
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If a View Page Source doesn't show an HTML IMG tag where the image is supposed to be, then you have either mis-coded the tag or its library definition. OR you aren't routing the URL through the FacesServlet, in which case none of the JSF will work properly.

You don't need all "h" or all "p" tags on your view. It would be redundant if you did. Generally, you should use the "h" tags except in cases where the "p" version of a tag (if there is one) can do a better job. So using a "p:dataTable" to get row/column span support that the "h:dataTable" doesn't provide and putting one or more "h:graphicImage" tags - or h:inputText, h:selectOneMenu, h:commandLink, or whatever - is not only valid, but preferable.
 
David Scholl
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:If a View Page Source doesn't show an HTML IMG tag where the image is supposed to be, then you have either mis-coded the tag or its library definition. OR you aren't routing the URL through the FacesServlet, in which case none of the JSF will work properly.

You don't need all "h" or all "p" tags on your view. It would be redundant if you did. Generally, you should use the "h" tags except in cases where the "p" version of a tag (if there is one) can do a better job. So using a "p:dataTable" to get row/column span support that the "h:dataTable" doesn't provide and putting one or more "h:graphicImage" tags - or h:inputText, h:selectOneMenu, h:commandLink, or whatever - is not only valid, but preferable.


No, there is not any problem with "img" or "h:graphicImage" tags. They work correctly outside "p:dataTable". Why do i use "h:dataTable"? Because i can't find a solution for my case (to design page - to create complicated "html table") with "h:" tags, and with html tags too.
 
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic