-
1. Re: Rich Editor
lfryc Jan 27, 2012 4:24 AM (in response to minku09)Hi mannu,
could you be more specific in what you are achieving?
-
2. Re: Rich Editor
minku09 Jan 27, 2012 12:50 PM (in response to lfryc)Hi Lukas,
I have Rich Editor and want to caputre what ever user enters in it and before submitting the page to form and want to warn user if he dont click save before closing the window.
Thanks
-
-
4. Re: Rich Editor
healeyb Jan 28, 2012 3:42 PM (in response to vi_mahe_ka1)I think you need to set a bean property from a <rich:editor valueChangeListener to indicate that the content has
changed (TBH I've never used it, so this is guess work...). You should be able to get the content from the
ValueChangeEvent parameter to the value change listener using getNewValue().
-
5. Re: Rich Editor
iabughosh Jan 29, 2012 4:40 AM (in response to minku09)hello munna,
try using this :
<rich:editor value="#{richBean.contents}">
<a4j:ajax event="change"/><!-- to save the value after previous focus-->
<a4j:ajax event="dirty"><!-- to save the value whenever user enters text-->
<a4j:attachQueue requestDelay="5000" ignoreDupResponses="true" /><!-- to prevent firing too much requests -->
</a4j:ajax>
</rich:editor>
-
6. Re: Rich Editor
minku09 Feb 1, 2012 12:44 PM (in response to iabughosh)Hi,
Thanks everyone, but nothing worked for me, I am using richfaces version 3.3.3, which i should have mentioned it earlier. any more help will be appreciated.
Thanks
-
7. Re: Rich Editor
mcmurdosound Feb 1, 2012 2:28 PM (in response to minku09)have you tried an <a4j:support event="onchange" ... ?
To detect the unload event of the current page, you'll have to add an eventlistener to the "onbeforeunload" event. But this one is quite tricky.
-
8. Re: Rich Editor
minku09 Feb 1, 2012 2:50 PM (in response to mcmurdosound)<rich:editor id="test" value="{user.data}" autoResize="true" width="250" height="100" theme="advanced" plugins="fullscreen" required="false">
<f:param name="theme_advanced_buttons1"
value="undo,redo,removeformat,|,formatselect,styleselect,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,insertdate,inserttime,hr,outdent,indent," />
<f:param name="theme_advanced_buttons2" value="" />
<f:param name="theme_advanced_buttons3" value="" />
<f:param name="theme_advanced_toolbar_location" value="top" />
<f:param name="theme_advanced_toolbar_align" value="left" />
<a4j:support immediate="true" event="onkeyup" reRender="outputEnteredText" />
</rich:editor>
<h:outputText id="outputEnteredText" value="Entered is: #{user.data}" />
i tried with onchange, onkeypress, onkeyup nothing worked, it will display the data when the page is refreshed but not during the event triggered.
Thanks,
-
9. Re: Rich Editor
mcmurdosound Feb 1, 2012 2:57 PM (in response to minku09)in my experience the onchange event of the RichEditor (RF3.3.3) is fired upon leaving the editor like clicking on the page elsewhere.
Are you using the editor in a modal panel or just in your page?
you should remove the "immediate="true"" from the a4j:support
-
10. Re: Rich Editor
minku09 Feb 1, 2012 3:16 PM (in response to mcmurdosound)i did removed immeidate = 'true' and i am not using it in modal panel. it feels like nothing is happening no event is fired at all.