开发者

Is there any rich text editor component for JSF RI?

  1. I am using JSF RI 1.1. How to add rich text editor component? Is there any rich text editor component available?
  2. 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.

Is there any rich text editor component for JSF RI?


(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. */
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜