voyent
ice:graphicImage without any distance  XML
Forum Index -> Components
Author Message
Newlukai

Joined: 29/Nov/2006 00:00:00
Messages: 125
Offline


Hi there,

first of all: I'm using ICEfaces 1.6.0 with Seam 1.2.1 on a JBoss AS 4.0.5.

I want to generate a nice chart with several bars. That's what the JSF looks like:

Code:
<h:panelGroup>
   <ice:graphicImage width="3" height="15" value="img/progress_border.gif" rendered="#{toDo.errorsToBugfixEqual3 > 0}" />
   <ice:graphicImage width="#{toDo.errorsToBugfixEqual3InPercent * 2}" height="15" value="img/progress_errorsEqual3.gif" rendered="#{toDo.errorsToBugfixEqual3 > 0}" />
   <ice:graphicImage width="#{200 - (toDo.errorsToBugfixEqual3InPercent * 2)}" height="15" value="img/progress_empty.gif" rendered="#{toDo.errorsToBugfixEqual3 > 0}" />
   <ice:graphicImage width="3" height="15" value="img/progress_border.gif" rendered="#{toDo.errorsToBugfixEqual3 > 0}" />
 </h:panelGroup>


The problem is that those images don't touch each other. There's a distance between them and that's annoying. So I thiought it's related to the "whitespace bug" and I've to remove all those line breaks.
But that doesn't help either since one framework (Seam, ICEfaces, Facelets, I don't know which one) renders line breaks between those <img>-tags even when there isn't a line break on the source page.

For test purposes I wrote sth like this:
Code:
 <img src="bla.gif" width="3" height="3" /><img src="bla.gif" width="3" height="3" />

in my JSF markup. But when the page is rendered, a framework inserted a line break.
That's really bad. Do you know which framework causes that line break. Is there any possibility to get rid of that behaviour?

To be sure that this line break is responsible for the distance between two images I created a normal html file on my disk and inserted this:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html lang="de"><head id="head"><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"></meta></head>
 <body>
   <img src="bla.gif" width="3" height="3" /><img src="bla.gif" width="3" height="3" />
   <img src="bla.gif" width="3" height="3" />
   <img src="bla.gif" width="3" height="3" />
 </body>
 </html>
 
 

Opening this html file with FF or IE showed me the same result: the first two gifs touched each other, the others don't.

Is there more inforamtion about that?

Thanks in advance
Newlukai
yip.ng

Joined: 26/Oct/2004 00:00:00
Messages: 70
Offline


I just fixed the problem. The fix should be in the next release.

[Email]
Newlukai

Joined: 29/Nov/2006 00:00:00
Messages: 125
Offline


Thanks for that.
Just out of curiosity: Will ICEfaces only render a line break when there is one in the source page or won't the line break be rendered any more?
yip.ng

Joined: 26/Oct/2004 00:00:00
Messages: 70
Offline


Currently, our rendering algorithm has some rather complicated conditions for outputting a line break, and the result may not be as intuitive as you would like. Sometimes a line break is not rendered even if there is one in the source. In that case you can always use an explicit <br/> tag to force a line break.

If you come across any other rendering inconsistencies, just raise them. We will see if we need to revamp the rendering algorithm.

Thanks.
[Email]
ksauer

Joined: 05/Jun/2007 00:00:00
Messages: 4
Offline


Hi,

i have the same problem with ICEfaces 1.6.1. Is it fixed in 1.6.1 or in the upcoming release?

Thanks
ksauer
yip.ng

Joined: 26/Oct/2004 00:00:00
Messages: 70
Offline


This should be fixed in v1.6.1. If it still doesn't work, please provide a simple test case to demonstrate your problem and we will look further into it. Thanks.
[Email]
 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team