This content has been marked as final.
Show 7 replies
-
1. Re: rich:editor dont works in rich:modalPanel
neps Nov 25, 2009 9:29 AM (in response to neps)"neps" wrote:
So, i get the last stable version(3.2.2) and i use rich:editor in the rich:modalpanel and dont works.
He still broken my application, after the reading the page of rich:editor all the components stop work.
this is bug?
my cod:
...
<rich:modalPanel id="documento" height="600" width="620">
<f:facet name="header">
<h:outputText value="Documento"/>
</f:facet>
<a4j:form>
<rich:editor value="#{disciplina.documento}" />
</a4j:form>
</rich:modalPanel>
...
Error javascript:
...
G.win.document is null
[Break on this error] }}catch(F){}if(!I){I=A?G.win.document.bo...extRange():G.win.document.createRange()\n
...
Thanks -
2. Re: Editor dont works in ModalPanel
juangon Nov 25, 2009 10:26 AM (in response to neps)Last version is 3.3.2 SR1 AFAIK.
And probably the solution for modalPanel is setting "domElementAttachment attribute to "parent". -
3. Re: Editor dont works in ModalPanel
neps Nov 26, 2009 2:20 PM (in response to neps)"juangon" wrote:
Last version is 3.3.2 SR1 AFAIK.
And probably the solution for modalPanel is setting "domElementAttachment attribute to "parent".
I dont understand your solution, i thought the problem was the modal but i tried with other modal(jquery.dialog) and the problem persists.
The problem is resolved with editor outer in modal. but all the system has form in the modalpanel.
You have code for your tip?!
Thanks! -
4. Re: Editor dont works in ModalPanel
ilya_shaikovsky Nov 27, 2009 7:35 AM (in response to neps)the problem is caused by the fact that modal moved within DOM tree to became the body direct children before show. (described in documentation). So editor just lost elements to which attached. Do not change nothing but just add domElementAttachment="parent" to modal panel to prevent modal from default behavior usage.
-
5. Re: Editor dont works in ModalPanel
neps Nov 27, 2009 12:55 PM (in response to neps)"ilya_shaikovsky" wrote:
the problem is caused by the fact that modal moved within DOM tree to became the body direct children before show. (described in documentation). So editor just lost elements to which attached. Do not change nothing but just add domElementAttachment="parent" to modal panel to prevent modal from default behavior usage.
\o/... Very thanks(to two), I had more one problem because i have modal in the modal but the problem been resolved with the same solution, this:
<rich:modalPanel id="modalDisciplinaGrade" domElementAttachment="parent">
...
<a4j:commandButton type="button" value="Documento" oncomplete="#{rich:component('documentoDisciplina')}.show()" reRender="documentoDisciplina" />
...
</rich:modalPanel>
<rich:modalPanel id="documentoDisciplina" domElementAttachment="parent">
<f:facet name="header">
<h:outputText value="Teste"/>
</f:facet>
</rich:modalPanel>
-
6. Re: Editor dont works in ModalPanel
juangon Nov 27, 2009 1:16 PM (in response to neps)"neps" wrote:
"ilya_shaikovsky" wrote:
the problem is caused by the fact that modal moved within DOM tree to became the body direct children before show. (described in documentation). So editor just lost elements to which attached. Do not change nothing but just add domElementAttachment="parent" to modal panel to prevent modal from default behavior usage.
\o/... Very thanks(to two), I had more one problem because i have modal in the modal but the problem been resolved with the same solution, this:
<rich:modalPanel id="modalDisciplinaGrade" domElementAttachment="parent">
...
<a4j:commandButton type="button" value="Documento" oncomplete="#{rich:component('documentoDisciplina')}.show()" reRender="documentoDisciplina" />
...
</rich:modalPanel>
<rich:modalPanel id="documentoDisciplina" domElementAttachment="parent">
<f:facet name="header">
<h:outputText value="Teste"/>
</f:facet>
</rich:modalPanel>
I had some problem like that many months ago, I guess you can't reRender the whole modalPanel, you only will be able to reRender a part of it. Using your example:<a4j:commandButton type="button" value="Documento" oncomplete="#{rich:component('documentoDisciplina')}.show()" reRender="documentoDisciplinaBody" /> . . <rich:modalPanel id="documentoDisciplina" domElementAttachment="parent"> <f:facet name="header"> <h:outputText value="Teste"/> </f:facet> <a4j:outputPanel id="documentoDisciplinaBody"> <body tags here> </a4j:outputPanel> </rich:modalPanel>
-
7. Re: Editor dont works in ModalPanel
neps Nov 27, 2009 4:00 PM (in response to neps)"juangon" wrote:
"neps" wrote:
"ilya_shaikovsky" wrote:
the problem is caused by the fact that modal moved within DOM tree to became the body direct children before show. (described in documentation). So editor just lost elements to which attached. Do not change nothing but just add domElementAttachment="parent" to modal panel to prevent modal from default behavior usage.
\o/... Very thanks(to two), I had more one problem because i have modal in the modal but the problem been resolved with the same solution, this:
<rich:modalPanel id="modalDisciplinaGrade" domElementAttachment="parent">
...
<a4j:commandButton type="button" value="Documento" oncomplete="#{rich:component('documentoDisciplina')}.show()" reRender="documentoDisciplina" />
...
</rich:modalPanel>
<rich:modalPanel id="documentoDisciplina" domElementAttachment="parent">
<f:facet name="header">
<h:outputText value="Teste"/>
</f:facet>
</rich:modalPanel>
I had some problem like that many months ago, I guess you can't reRender the whole modalPanel, you only will be able to reRender a part of it. Using your example:<a4j:commandButton type="button" value="Documento" oncomplete="#{rich:component('documentoDisciplina')}.show()" reRender="documentoDisciplinaBody" /> . . <rich:modalPanel id="documentoDisciplina" domElementAttachment="parent"> <f:facet name="header"> <h:outputText value="Teste"/> </f:facet> <a4j:outputPanel id="documentoDisciplinaBody"> <body tags here> </a4j:outputPanel> </rich:modalPanel>
Well, this way it's ok.. but i can improve the content. anyway very thanks again.