rich:ModalPanel js problems
furic Nov 25, 2007 2:45 PMHi
I'm using modalPanel with tiles like this :
<rich:modalPanel id="topicPopup" > <tiles:insert definition="modalPopupTemplate" flush="false"> <tiles:put name="body" value="/depStaffMngr/editTopic.jsp"/> <tiles:put name="panelID" value="topicPopup"/> <tiles:put name="header" value="Edit topic details"/> </tiles:insert> </rich:modalPanel>
modalPopupTemplate defined as :
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%> <%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"%> <%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%> <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich"%> <f:facet name="header"> <f:verbatim> <tiles:getAsString name="header"/> </f:verbatim> </f:facet> <f:facet name="controls"> <t:div> <t:graphicImage value='#{requestScope["basePath"]}img/closed.jpg' style="cursor:pointer" onclick="closePopupObj(this)"/> <f:verbatim> <span style="display:none"><tiles:getAsString name="panelID"/></span> </f:verbatim> </t:div> </f:facet> <h:form> <a4j:outputPanel ajaxRendered="true"> <h:messages id="errorMessages" styleClass="error" /> </a4j:outputPanel> <tiles:insert attribute="body" flush="false" /> </h:form>
and editTopic.jsp :
<%@ page language="java" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%> <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%> <f:loadBundle basename="com.unilims.academic.MessageResources" var="msg"/> <f:subview id="EditTopicView" > <h:inputHidden id="id" value="#{topicBean.obj.id}" /> <h:panelGrid columns="2" styleClass="infoTable"> <f:facet name="header"> <h:outputText value="Topic details"/> </f:facet> <h:outputText value="Topic"/> <h:inputText value="#{topicBean.obj.topic}"/> </h:panelGrid> <a4j:commandButton value="#{msg['save']}" action="#{topicBean.saveObject}" oncomplete="closePopup('topicPopup',true)"/> </f:subview>
My problems are :
1. modalPanel is not opened unless i open log window
2. i get js error "Prototype.Browser.IE" is null or not an object
debug window log is :
.....
Namespace for hidden view-state input fields is undefined
debug[21:39:44,609]: search for elements by name 'input' in element span
debug[21:39:44,625]: selectNodes found 1
debug[21:39:44,625]: Replace value for inputs: 65 by new values: 1
debug[21:39:44,640]: Input in response: javax.faces.ViewState
debug[21:39:44,640]: Found same input on page with type: hidden
debug[21:39:44,656]: Found same input on page with type: hidden
debug[21:39:44,656]: Found same input on page with type: hidden
debug[21:39:44,671]: Found same input on page with type: hidden
debug[21:39:44,671]: Found same input on page with type: hidden
debug[21:39:44,687]: Found same input on page with type: hidden
debug[21:39:44,687]: Found same input on page with type: hidden
debug[21:39:44,703]: search for elements by name 'INPUT' in element span
debug[21:39:44,703]: selectNodes found 0
debug[21:39:44,718]: Replace value for inputs: 65 by new values: 0
debug[21:39:44,718]: call selectSingleNode for id= _ajax:data
debug[21:39:44,734]: call selectSingleNode for id= _A4J.AJAX.focus
debug[21:39:44,750]: No focus information in response