- 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>
views:
123answers:
2
A:
1) Mojarra Scales has a htmlEditor component.
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. */
}
BalusC
2010-03-27 13:32:58
Thank you very much Dear BalusC. As Pablo Santa Cruz commented i ll ask questions one bye one
Paul
2010-03-29 06:19:58
Hi BalusC ur code works fine. but my requirement is little bit different.i failed to explain it clearly. The images are displayed horizontally using <t:dataList>. At first no images are selected if selected it has to be highlighted. If user changes the selection the old has to go normal and new has to be highlighted. while in edit mode we need to highlight the already selected image and they may change in this mode so highlight should change. pls provide some solution.
Paul
2010-03-30 08:26:57