简体   繁体   English

JSF-如何在f:selectItem元素后添加h:graphicImage?

[英]JSF - How to add h:graphicImage after f:selectItem element?

I am trying to add ah:graphicImage after the f:selecItem element, using this declaration: 我正在尝试使用以下声明在f:selecItem元素之后添加ah:graphicImage:

<h:selectManyCheckbox layout="pageDirection">

    <f:selectItem itemValue="some Value" itemLabel="some Label" itemDisabled="true">
         <h:graphicImage value="someImage.gif" title="someTitle" />
    </f:selectItem>

</h:selectManyCheckbox>

and, 和,

 <h:selectManyCheckbox layout="pageDirection">

    <f:selectItem itemValue="some Value" itemLabel="some Label" itemDisabled="true" />
    <h:graphicImage value="someImage.gif" title="someTitle" />        

</h:selectManyCheckbox>

But, after rendering, the graphicImage element always show before the selectItem group. 但是,在渲染之后,graphicImage元素始终显示在selectItem组之前。

In these cases, I've always used a dataTable over a list of beans. 在这些情况下,我一直在豆列表上使用dataTable。 The first column contained a selectBooleanCheckbox over a boolean property of the bean (pe selected), and I had more columns with the content that I need, so I could have got graphicImage or whatever else. 第一列在bean的boolean属性(选择pe)上包含一个selectBooleanCheckbox,并且我有更多具有所需内容的列,因此我可以得到graphicImage或其他任何东西。

I only also needed an additional java logic to get the selected beans, and process the data. 我还只需要一个附加的Java逻辑即可获取所选的bean,并处理数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM