trouble remoting migrate from 2.0.2 to 2.1.2
ajanz Aug 19, 2009 6:36 PMi got some trouble using remoting. i use it for using fckedit.
with seam 2.0.2 it works fine. but now i migrated to seam 2.1.2
under ie7, the loading with "please wait" does not come back
under firefox this happens only sometimes.
any idea what i could do?
page is
<?xml version="1.0" encoding="ISO-8859-1"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:s="http://jboss.com/products/seam/taglib">
<rich:modalPanel id="bearbeitendlgaufgabe" autosized="false" height="580" overlapEmbedObjects="true" width="750" rendered="true" onshow="fckedit();" >
<script type="text/javascript" src="seam/resource/remoting/resource/remote.js"></script>
<script type="text/javascript" src="seam/resource/remoting/interface.js?Page"></script>
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
<script type="text/javascript">
//<![CDATA[
function fckedit()
{
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
alert('Hallo');
var session =Seam.Component.getInstance('Page');
alert('Hallo2');
if ( session != null ) {
alert('init');
session.getBearbeitungstext(sayHelloCallback);
}
else alert(' is null ');
//oFCKeditor.Value ="schrting";
//oFCKeditor.Create();
}
function save(){
var session =Seam.Component.getInstance('Page');
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
if ( oEditor == null ) alert(' Editor nicht gefunden ');
if ( session != null ) {
session.setBearbeitungstext(oEditor.GetData(true));
}
else alert(' save is null ');
//oFCKeditor.Value ="schrting";
}
function showValue(){
alert('test');
// Get the editor instance that we want to interact with.
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
// Get the editor contents in XHTML.
alert( oEditor.GetXHTML( true ) ) ;
}
function sayHelloCallback(result) {
oFCKeditor = new FCKeditor( 'FCKeditor1', 720, 400 );
alert('sayHelloCallback');
if ( oFCKeditor == null ) alert ('Referenz editor nicht gefunden ');
//oFCKeditor.Value ='schtring'; ;
var sBasePath = '/2csoa/fckeditor/';
oFCKeditor.BasePath = sBasePath ;
var sSkinPath = sBasePath + 'editor/skins/office2003/' ;
oFCKeditor.Config['SkinPath'] = sSkinPath ;
oFCKeditor.Config['MaxLength'] = 5;
oFCKeditor.ToolbarSet = 'MyToolbar' ;
oFCKeditor.Config['PreloadImages'] =
sSkinPath + 'images/toolbar.start.gif' + ';' +
sSkinPath + 'images/toolbar.end.gif' + ';' +
sSkinPath + 'images/toolbar.bg.gif' + ';' +
sSkinPath + 'images/toolbar.buttonarrow.gif' ;
alert('Replace');
oFCKeditor.ReplaceTextarea() ;
oFCKeditor.insertHtml(result);
}
function limitText(limitField, limitNum) {
alert('limit');
}
//]]>
</script>
<f:facet name="header">
<h:panelGroup>
<h:outputText value="Bearbeiten"></h:outputText>
</h:panelGroup>
</f:facet>
<h:form id="bearbeitenformaufgabe" styleClass="Tundra">
<rich:messages id="errormsg" />
<h:panelGroup >
<h:panelGrid columns="2">
<h:outputLabel value="Status" for="" />
<rich:comboBox value="#{Page.bearbeitungsstatus}" >
<f:selectItems value="#{Page.comboentries}" />
</rich:comboBox>
</h:panelGrid>
</h:panelGroup>
<rich:spacer width="5px"></rich:spacer>
<rich:separator rendered="#{Page.ergebnismode}"></rich:separator>
<h:panelGrid id="bearbeitenpanelaufgabe" columns="1" width="600" >
<textarea name="FCKeditor1" id="textaufgabe" rows="80" cols="80" style="width: 100%; height: 250px" >#{Page.bearbeitungstext}</textarea>
</h:panelGrid>
<rich:spacer height="5px" width="5px"></rich:spacer>
<div>
<rich:spacer height="5px" width="5px"></rich:spacer>
<rich:separator></rich:separator>
<h:panelGrid columns="2" style="float:right" >
<a4j:commandButton id="btnokaufgabe" value="Ok" onclick="save();"
oncomplete="Richfaces.hideModalPanel('bearbeitendlgaufgabe');" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor=''"
styleClass="rich-button" action="#{Page.savebearbeitungstext}" reRender="tabcurrent"
style="width:90px;" >
</a4j:commandButton>
<a4j:commandButton id="btncancelaufgabe" value="Abrechen" immediate="true" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor=''"
onclick="Richfaces.hideModalPanel('bearbeitendlgaufgabe')" styleClass="rich-button"
style="width:90px;float:right;">
</a4j:commandButton>
</h:panelGrid>
</div>
</h:form>
</rich:modalPanel>
</ui:composition>
with seam 2.0.2 it works fine. but now i migrated to seam 2.1.2
under ie7, the loading with "please wait" does not come back
under firefox this happens only sometimes.
any idea what i could do?
page is
<?xml version="1.0" encoding="ISO-8859-1"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:s="http://jboss.com/products/seam/taglib">
<rich:modalPanel id="bearbeitendlgaufgabe" autosized="false" height="580" overlapEmbedObjects="true" width="750" rendered="true" onshow="fckedit();" >
<script type="text/javascript" src="seam/resource/remoting/resource/remote.js"></script>
<script type="text/javascript" src="seam/resource/remoting/interface.js?Page"></script>
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
<script type="text/javascript">
//<![CDATA[
function fckedit()
{
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
alert('Hallo');
var session =Seam.Component.getInstance('Page');
alert('Hallo2');
if ( session != null ) {
alert('init');
session.getBearbeitungstext(sayHelloCallback);
}
else alert(' is null ');
//oFCKeditor.Value ="schrting";
//oFCKeditor.Create();
}
function save(){
var session =Seam.Component.getInstance('Page');
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
if ( oEditor == null ) alert(' Editor nicht gefunden ');
if ( session != null ) {
session.setBearbeitungstext(oEditor.GetData(true));
}
else alert(' save is null ');
//oFCKeditor.Value ="schrting";
}
function showValue(){
alert('test');
// Get the editor instance that we want to interact with.
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
// Get the editor contents in XHTML.
alert( oEditor.GetXHTML( true ) ) ;
}
function sayHelloCallback(result) {
oFCKeditor = new FCKeditor( 'FCKeditor1', 720, 400 );
alert('sayHelloCallback');
if ( oFCKeditor == null ) alert ('Referenz editor nicht gefunden ');
//oFCKeditor.Value ='schtring'; ;
var sBasePath = '/2csoa/fckeditor/';
oFCKeditor.BasePath = sBasePath ;
var sSkinPath = sBasePath + 'editor/skins/office2003/' ;
oFCKeditor.Config['SkinPath'] = sSkinPath ;
oFCKeditor.Config['MaxLength'] = 5;
oFCKeditor.ToolbarSet = 'MyToolbar' ;
oFCKeditor.Config['PreloadImages'] =
sSkinPath + 'images/toolbar.start.gif' + ';' +
sSkinPath + 'images/toolbar.end.gif' + ';' +
sSkinPath + 'images/toolbar.bg.gif' + ';' +
sSkinPath + 'images/toolbar.buttonarrow.gif' ;
alert('Replace');
oFCKeditor.ReplaceTextarea() ;
oFCKeditor.insertHtml(result);
}
function limitText(limitField, limitNum) {
alert('limit');
}
//]]>
</script>
<f:facet name="header">
<h:panelGroup>
<h:outputText value="Bearbeiten"></h:outputText>
</h:panelGroup>
</f:facet>
<h:form id="bearbeitenformaufgabe" styleClass="Tundra">
<rich:messages id="errormsg" />
<h:panelGroup >
<h:panelGrid columns="2">
<h:outputLabel value="Status" for="" />
<rich:comboBox value="#{Page.bearbeitungsstatus}" >
<f:selectItems value="#{Page.comboentries}" />
</rich:comboBox>
</h:panelGrid>
</h:panelGroup>
<rich:spacer width="5px"></rich:spacer>
<rich:separator rendered="#{Page.ergebnismode}"></rich:separator>
<h:panelGrid id="bearbeitenpanelaufgabe" columns="1" width="600" >
<textarea name="FCKeditor1" id="textaufgabe" rows="80" cols="80" style="width: 100%; height: 250px" >#{Page.bearbeitungstext}</textarea>
</h:panelGrid>
<rich:spacer height="5px" width="5px"></rich:spacer>
<div>
<rich:spacer height="5px" width="5px"></rich:spacer>
<rich:separator></rich:separator>
<h:panelGrid columns="2" style="float:right" >
<a4j:commandButton id="btnokaufgabe" value="Ok" onclick="save();"
oncomplete="Richfaces.hideModalPanel('bearbeitendlgaufgabe');" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor=''"
styleClass="rich-button" action="#{Page.savebearbeitungstext}" reRender="tabcurrent"
style="width:90px;" >
</a4j:commandButton>
<a4j:commandButton id="btncancelaufgabe" value="Abrechen" immediate="true" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor=''"
onclick="Richfaces.hideModalPanel('bearbeitendlgaufgabe')" styleClass="rich-button"
style="width:90px;float:right;">
</a4j:commandButton>
</h:panelGrid>
</div>
</h:form>
</rich:modalPanel>
</ui:composition>