This content has been marked as final.
Show 2 replies
-
1. Re: rerender not working
sptexas May 23, 2009 7:26 PM (in response to sptexas)After reading some more on problems similar to this, I tried wrapping the TabPanel in an <a4j:outputPanel>, but the "PlotPanel" still does not render, but the "StartDate1" does rerender within the panel.
Any ideas as to what I'm missing here would be greatly appreciated.<h:form id="EBOTForm"> <h:panelGrid columns="6"> <label for="PeriodRange">Previous:</label> <h:selectOneMenu id="PeriodRange" value="#{dWRFD1Handler.range}" required="true"> <f:selectItems value="#{dWRFD1Handler.ranges}" /> <a4j:support event="onchange" reRender="PlotPanel, StartDate, EndDate" /> </h:selectOneMenu> <label for="StartDate" >Start:</label> <h:outputText id="StartDate" value="#{dWRFD1Handler.startDate}" > <f:convertDateTime type="date" pattern="MM/dd/yy h a" /> </h:outputText> <label for="EndDate" >End:</label> <h:outputText id="EndDate" value="#{dWRFD1Handler.endDate}"> <f:convertDateTime type="date" pattern="MM/dd/yy h a" /> </h:outputText> <h:commandButton id="downloadBTN" value="download" action="#{dWRFD1Handler.act}" style="width: 6em" /> </h:panelGrid> <a4j:outputPanel layout="block"> <a4j:outputPanel ajaxRendered="true"> <rich:tabPanel id="PlotPanel" binding="#{dWRFD1Handler.tabPanel}" width="85%" renedered="true"> </rich:tabPanel> <label for="StartDate1" >Start:</label> <h:outputText id="StartDate1" value="#{dWRFD1Handler.startDate}" > <f:convertDateTime type="date" pattern="MM/dd/yy h a" /> </h:outputText> <h:messages/> </a4j:outputPanel> </a4j:outputPanel> </h:form> **** public HtmlTabPanel getTabPanel() { LOG.info("getTabPanel()"); FacesContext context = FacesContext.getCurrentInstance(); Application application = context.getApplication(); tabPanel = (HtmlTabPanel) application.createComponent(HtmlTabPanel.COMPONENT_TYPE); for (Well well : getWells()) { HtmlTab tab = (HtmlTab) application.createComponent(HtmlTab.COMPONENT_TYPE); tab.setId("well_" + COUNTER); tab.setLabel(well.getName()); HtmlGraphicImage graphicImage = (HtmlGraphicImage) application.createComponent(HtmlGraphicImage.COMPONENT_TYPE); graphicImage.setId("image_" + COUNTER++); String plotURL = getPlot(well); graphicImage.setUrl(plotURL); tab.getChildren().add(graphicImage); tabPanel.getChildren().add(tab); } return tabPanel; }
-
2. Re: rerender not working
ilya_shaikovsky May 25, 2009 5:47 AM (in response to sptexas)binding should be request scoped.