开发者

Icefaces rowselector

开发者 https://www.devze.com 2023-02-09 05:38 出处:网络
Could someone give me a nice and clean example of how to use the Icefaces 2.0 rowselector? My plan is to use it as a component, so I can reuse it for all kinds of lists.

Could someone give me a nice and clean example of how to use the Icefaces 2.0 rowselector? My plan is to use it as a component, so I can reuse it for all kinds of lists.

<ice:dataTable id="table" va开发者_Go百科lue="#{cc.attrs.list}" var="record">

    <ice:column>
      <ice:rowSelector rendered="#{cc.attrs.select == 1}" value="#{cc.attrs.selectMethod}"
               selectedClass="tableRowSelected" mouseOverClass="tableRowMouseOver"
               immediate="false" selectionListener="#{cc.attrs.selectMethod}" />

      <f:facet name="header">
        <ice:outputText value="#{record.idDesc}"></ice:outputText>
      </f:facet>
      <ice:outputText value="#{record.id}"></ice:outputText>
    </ice:column>
  ..
  </ice:dataTable>

As you may see, I'm not sure how Im going to handle the value="???" and the selectionListener="???". I'm not sure how to implement it in the bean.

It would be great if I can separate the bean and the component methods into two differnet classes. Whenever I need a rowSelector, for some List object in some Bean, I simply add the Component object to present bean.

Maybe to many things at 1 time, if so, sorry for that =)

B.R


Problem solved! =)

Made a list and a listener.

0

精彩评论

暂无评论...
验证码 换一张
取 消