2)有条件地添加styleClass.styleClass="#{item.previouslySelected ? 'selected' : ''}"与此吸气剂public boolean isPreviouslySelected() { return previouslySelected;}和此CSS img.selected { border: 2px solid red; /* Use whatever highlight style here. */}I am using JSF RI 1.1. How to add rich text editor component? Is there any rich text editor component available?I am displaying set of images horizontally using the below code. Selected image is stored in database. while showing the images in edit mode, how to highlight the previously selected image?<t:dataList var="item" value="#{occasionBean.messageInfo}" layout="simple"> <h:commandLink action="#{occasionBean.selectedImage}" > <h:graphicImage width="100" height="100" url="#{item.imageSnapUrl}" onclick="return setMsgId(this.id,{item.img_id},'{item.imageUrl}');" id="test"> </h:graphicImage> </h:commandLink></t:dataList> 解决方案 1) Mojarra Scales has a htmlEditor component.2) Add a styleClass conditionally.styleClass="#{item.previouslySelected ? 'selected' : ''}"with this getterpublic boolean isPreviouslySelected() { return previouslySelected;}and this CSSimg.selected { border: 2px solid red; /* Use whatever highlight style here. */} 这篇关于JSF RI是否有任何RTF编辑器组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-11 14:42