With suckerfish drop down menus,
(actually, Son of Suckerfish:
http://www.htmldog.com/ptg/archives/000050.php)
dropdown menus are made using nested ul/li tags and css (plus some IE fixes
using javascript). The problem is that IE renders an additional blank line
for every <li> item. The fix is to write markup without any whitespace
between the <li> and it's previous </li> tag:
<ul><li>
Dude</li><li>
Sweet</li><li>
Dude!</li><li>
Sweet!</li></ul>
Well, dataList doesn't output like that. It puts every iterative line on
it's own. So I had to hack in some <li>s and </li>s on my own:
<t:dataList id="menu" var="link" value="#{bean.links}" layout="simple"
rowIndexVar="row" rowCountVar="total">
<h:outputText value="<ul><li>" escape="false" rendered="#{row == 0}" />
<h:outputLink value="#{link.url}">
<h:outputText value="#{link.name}"/>
</h:outputLink>
<h:outputText value="</li><li>" escape="false" rendered="#{row != total
-
1}" />
<h:outputText value="</li></ul>" escape="false" rendered="#{row ==
total -
1}" />
</t:dataList>
<h:outputText value="</li></ul>" escape="false" rendered="#{row ==
total -
1}" />
</t:dataList>
This is obviously a huge bandaid. Is there a way to grab and modify the way
the dataList is rendered to the page?
--
View this message in context:
http://www.nabble.com/dataList-with-Suckerfish-menus%2C-IE-problem-tf2143372.html#a5916690
Sent from the MyFaces - Users forum at Nabble.com.