-
1. Re: user a4j:jsFunction to save rich:editor content
yyq2009 Aug 4, 2009 11:18 PM (in response to zjda)
The saveData function is called as testSave() action is invoked. However, setcontentString() are not called and modified content is not saved.
This is because you set a4j:jsFunction attribtue "ajaxsingle='true'", if you want to pass the editor's value to server, you should add attribute "process='htmlEditor'" to it.
If I remove <a4j:region> tag around the a4j:commandButton, the content will be saved everytime I click on the button.
I don't think it will run like your description, maybe, you close action do the save action again.
My opinion only!! -
2. Re: user a4j:jsFunction to save rich:editor content
zjda Aug 4, 2009 11:42 PM (in response to zjda)Thank you for your reply.
As you pointed it out, "ajaxsingle='true'" caused the problem. After I remove the attribute, it works as expected even without attribute "process='htmlEditor'".
My close action does not save it. I think that the close button submits the form, the server processes the editor component and save the content if there is no a4j:region around it.
Regards,
-ZJ -
3. Re: user a4j:jsFunction to save rich:editor content
yyq2009 Aug 4, 2009 11:58 PM (in response to zjda)That's right, if you remove "ajaxsingle=true", it works normally, but, if you do this, the whole form will be submitted as well, it means that you form has four fields, then four fields's value will be transfered to the server. if you just want to use editor's value, you should add "ajaxsingle=true" and "ajaxsingle=true", then only the editor's value will pass to the server.
I think that the close button submits the form
That's true.
I don't know your words "the content will be saved everytime" means, your "saved" means server cant read the eidtor's value or the value saved into DB or some other meaning? -
4. Re: user a4j:jsFunction to save rich:editor content
zjda Aug 5, 2009 10:06 AM (in response to zjda)Yes, "saved" means setContentString() is called which saved the value in the editor to the DB. Now I put a4j:region around jsFunction and the editor, and I think only these two components are processed when the jsFucntion is invoked.
Thanks,
-ZJ