-
1. Can I make popupPanel not rendered in loaded page?
ilya_shaikovsky Mar 1, 2011 4:31 AM (in response to v_panasyuk)you could do it for sure. just use something like:
<a4j:outputPanel id="updateMeWhenNeedPanel">
<rich:popupPanel rendered="#{shouldBeFalseUntilNeeded}" show="#{setToTrueIfNeedToDisplayRightAfterAction}">
...
</rich:popupPanel>
</a4j:outputPanel>
<a4j:commandButton action="#{controller.activatePanel}" render="updateMeWhenNeedPanel">
-
2. Re: Can I make popupPanel not rendered in loaded page?
v_panasyuk Mar 2, 2011 6:00 AM (in response to ilya_shaikovsky)I try something like this. In IE 7.0 I have problem, when I execute <a4j:commandButton>. I have JAVAScript ERROR
with popup widow
A runtime Error has occured. Do you wish Debug? Line 282. Error:'undefined' is null or not an object.
<h:form prependId="false">
<a4j:commandButton action="#{patientDataModel.show}" value="Select patient"
render="selectPatientPopupWrapper" />
<a4j:outputPanel id="selectPatientPopupWrapper">
<rich:popupPanel id="popup" modal="false" autosized="true"
onmaskclick="#{rich:component('popup')}.hide()"
rendered="#{patientDataModel.rendered}"
show="#{patientDataModel.show}">
<f:facet name="header">
<h:outputText value="New accession" />
</f:facet>
<f:facet name="controls">
<h:outputLink value="#"
onclick="#{rich:component('popup')}.hide(); return false;">
X
</h:outputLink>
</f:facet>
</rich:popupPanel>
</a4j:outputPanel>
</h:form>
-
3. Re: Can I make popupPanel not rendered in loaded page?
ilya_shaikovsky Mar 3, 2011 4:02 AM (in response to v_panasyuk)has no error with next simple test.
<h:selectBooleanCheckbox id="cb">
<a4j:ajax render="mc @this"/>
</h:selectBooleanCheckbox>
</h:form>
<a4j:outputPanel ajaxRendered="true" layout="block" id="mc">
<rich:popupPanel id="popup" modal="false" autosized="true"
rendered="#{rich:findComponent('cb').value}"
show="#{rich:findComponent('cb').value}" resizeable="false">
try to add layout to outputpanel
-
4. Can I make popupPanel not rendered in loaded page?
v_panasyuk Mar 3, 2011 10:12 AM (in response to ilya_shaikovsky)I create simple page, but error still happend in IE 7.0.5730.13
Mojarra 2.0.4 (FCS b09)
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</h:head>
<h:body>
<h:form>
<h:selectBooleanCheckbox id="cb">
<a4j:ajax render="mc @this"/>
</h:selectBooleanCheckbox>
<a4j:outputPanel ajaxRendered="true" layout="block" id="mc">
<rich:popupPanel id="popup" modal="false" autosized="true"
rendered="#{rich:findComponent('cb').value}"
show="#{rich:findComponent('cb').value}" resizeable="false"/>
</a4j:outputPanel>
</h:form>
</h:body>
</html>