voyent
selectOneListbox is a combobox?  XML
Forum Index -> Components
Author Message
aberrant80

Joined: 20/Jul/2006 00:00:00
Messages: 34
Offline


Hi, I have a question regarding selectOneListbox.

Apaprently, if I have 0 or 1 item inside it, the component actually renders like an elongated combobox. When I add more items, the component will switch back to look like a normal listbox (with the scrollbars and all). So it the listbox is rendered as a combobox with 0 or 1 item, but rendered as a listbox with 2 items or more.

What I'm not sure is if this is a bug, or just some attribute or style that I've overlooked.
philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


Hi,

Could you post your selectOneListBox markup?

Thanks,
Philip

.
aberrant80

Joined: 20/Jul/2006 00:00:00
Messages: 34
Offline


Hi, here it is:

<ice:selectOneListbox value="#{mybean.selectedItem}"
styleClass="listStyle">
<f:selectItems value="#{mybean.allItems}" />
</ice:selectOneListbox>

Wrapped inside a panelGroup and then a panelGrid. The listbox looks like a combobox when my list of items is empty or just has 1 item. Could this be a Firefox problem? I'm still trying to figure out which script is preventing my app from working in IE.
philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


Hi,

Just set the size attribute, ie. size="10", and the selectOneListbox will remain at a set height no matter how many items you have.

Thanks,
Philip

.
liviu

Joined: 04/May/2007 00:00:00
Messages: 7
Offline


Hi,

Could you also tel me how do I enable the scrollbar for the <ice:tree ?

I have the following sample:

<ice:tree
id="tree" value="#{tree.model}" var="item" hideRootNode="false"
hideNavigation="false" imageDir="./xmlhttp/css/xp/css-images/">
<ice:treeNode>
<f:facet name="icon">
<ice:panelGroup style="display: inline">
<h:graphicImage value="#{item.userObject.icon}" />
</ice:panelGroup>
</f:facet>
<f:facet name="content">
<ice:panelGroup style="display: inline">
<ice:outputText value="#{item.userObject.text}" />
</ice:panelGroup>
</f:facet>
</ice:treeNode>
</ice:tree>
huevo

Joined: 14/Jul/2009 00:00:00
Messages: 2
Offline


Scroll in tree on IceFaces is simple !!!

if you want to make a ice:tree with scroll...
You need to put the tree into a ice:panelGroup a use the attribute scrollHeight

Example:

<ice:panelGroup scrollHeight="300px">
<ice:tree id="tree"
value="#{tree.model}"
var="item"
hideRootNode="false"
hideNavigation="false"
imageDir="./xmlhttp/css/xp/css-images/">
<ice:treeNode>
etc... etc... etc ....
</ice:treeNode>
</ice:tree>
<ice:panelGroup>

I hope, can help us....
 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team