hamiltd1
17th June 2008, 03:40 PM
We have started using rich:modalPanels in our application, such as:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://richfaces.org/rich"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:t="http://myfaces.apache.org/tomahawk">
<script LANGUAGE="JavaScript" TYPE="text/javascript" SRC="/jspell/jspellSettings.js" CHARSET="ISO-8859-1"></script>
<script LANGUAGE="JavaScript" TYPE="text/javascript" SRC="/jspell/jspellEvolution.js" CHARSET="ISO-8859-1"></script>
<script>
window.onload=jspellInit;
function getSpellCheckArray() {
var fieldsToCheck=new Array();
fieldsToCheck[0]=[document,"newExpenseComments"];
}
</script>
<rich:modalPanel id="newExpenseModalPanel" height="280" width="900"
minHeight="200" minWidth="900" keepVisualState="false"
autosize="true" headerClass="modalHeader">
<h:form>
<t:inputTextarea cols="22" rows="5" id="newExpenseComments"
forceId="true" value="Hi there">
</t:inputTextarea>
</h:form>
</rich:modalPanel>
</html>
This is saved in a file such as modalPanel.xhtml
In another page it is called as follows:
<a4j:commandLink action="#{handler.doSomeWork}"
oncomplete="Richfaces.showModalPanel('newExpenseModalPanel');"
reRender="modalPanel" value="Add an Expense Entry" />
For this to work I had to change var jspellAttachToHiddenElements=true;
in the jspellSettings.js config file. However, rather than showing the textarea it shows a very tiny iframe with a blue border.
I've used the Mozilla DOM Inspector to find the iFrame's id, but I can't get it to resize or become visible. If I remove the JSpell code the textarea comes up correctly.
Does anyone know what I'm doing wrong? I've been looking at this for the past week and can't find the problem. I also tried calling jspellDetach followed by jspellAttach with no success.
Any help would be greatly appreciated
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://richfaces.org/rich"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:t="http://myfaces.apache.org/tomahawk">
<script LANGUAGE="JavaScript" TYPE="text/javascript" SRC="/jspell/jspellSettings.js" CHARSET="ISO-8859-1"></script>
<script LANGUAGE="JavaScript" TYPE="text/javascript" SRC="/jspell/jspellEvolution.js" CHARSET="ISO-8859-1"></script>
<script>
window.onload=jspellInit;
function getSpellCheckArray() {
var fieldsToCheck=new Array();
fieldsToCheck[0]=[document,"newExpenseComments"];
}
</script>
<rich:modalPanel id="newExpenseModalPanel" height="280" width="900"
minHeight="200" minWidth="900" keepVisualState="false"
autosize="true" headerClass="modalHeader">
<h:form>
<t:inputTextarea cols="22" rows="5" id="newExpenseComments"
forceId="true" value="Hi there">
</t:inputTextarea>
</h:form>
</rich:modalPanel>
</html>
This is saved in a file such as modalPanel.xhtml
In another page it is called as follows:
<a4j:commandLink action="#{handler.doSomeWork}"
oncomplete="Richfaces.showModalPanel('newExpenseModalPanel');"
reRender="modalPanel" value="Add an Expense Entry" />
For this to work I had to change var jspellAttachToHiddenElements=true;
in the jspellSettings.js config file. However, rather than showing the textarea it shows a very tiny iframe with a blue border.
I've used the Mozilla DOM Inspector to find the iFrame's id, but I can't get it to resize or become visible. If I remove the JSpell code the textarea comes up correctly.
Does anyone know what I'm doing wrong? I've been looking at this for the past week and can't find the problem. I also tried calling jspellDetach followed by jspellAttach with no success.
Any help would be greatly appreciated