Hi,
First I'm really impressed by FCK! excelent job!
I'm working to integrate FCK into a Visual Web Netbeans project (=JSF+Woodstock)
I know I could also use ICEFace as this already includes FCK, however ICE is not yet fully integrated as Woodstock is.
Ok here are my options, and I hope some one could give me some improvement to do this correct.
I have two implementations working (hope this helps others as well integrating FCKeditor)
1. I wrote a wrapper in the backBean of the JSF page.
In the backbean I added the following code:
Home.java:
public String getFckEditorHTML() { HttpServletRequest request = (HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest(); FCKeditor editor = new FCKeditor(request, "editorDefault"); return editor.createHtml(); }
Re: Best practise: FCKeditor in JSF/Woodstock Netbeans
You could use some JS to copy the textarea content to another hidden field which is actually bound to your bean.
I don't think that there is a clean way since the editor is a client-side component and JSF is a server-side issue.
BUT I am not skilled in JSF, this can maybe solvable anyway. Some other folks were struggling already with JSF and the editor. You may search the forums for.
Re: Best practise: FCKeditor in JSF/Woodstock Netbeans
That is an interesting idea to copy it client side into a hidden field that operates within the JSF context. The way I currently solved it is similar only I do the copying on the server side. I do use the wrapper combined with the FCKeditorConfig class , it gives me full control how to launch the editor. and I use a JSF hidden field to store the content. This hidden field is then preserved during partial posts and Ajax interaction with the page.
I've searched the forums and some notes are there, also a fckeditor-faces jar.
Wessel
Re: Best practise: FCKeditor in JSF/Woodstock Netbeans
There is some other project which claims to integrate the editor into JSF. I have scanned the code and it's crap (in my opinion). Unstructured and limited.
Besides that I would like to add JSF support, make it JSF-aware somehow but I have no idea where it start with JSF since there are zillions of implementations and I don't know if it would make sense to stick to Sun's RI. Another issue is the spare time I have. Since I am full time student and work part-time, I have very little time to start with JSF from the scratch.
If you can point me in the right direction, I would provide this feature for version 2.6.
Mike