Is there any rich text editor component for JSF RI?
- 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="10开发者_运维知识库0" url="#{item.imageSnapUrl}" onclick="return setMsgId(this.id,{item.img_id},'{item.imageUrl}');" id="test"> </h:graphicImage> </h:commandLink> </t:dataList>
Richfaces has editor component.
1) Mojarra Scales has a htmlEditor component.
(source: kenai.com)
2) Add a styleClass
conditionally.
styleClass="#{item.previouslySelected ? 'selected' : ''}"
with this getter
public boolean isPreviouslySelected() {
return previouslySelected;
}
and this CSS
img.selected {
border: 2px solid red; /* Use whatever highlight style here. */
}
精彩评论