-
1. Re: Any way to limit which backing beans process?
sergeysmirnov May 2, 2008 12:49 PM (in response to leptronic)information you provided is not enough to make any suggestion.
-
2. Re: Any way to limit which backing beans process?
leptronic May 2, 2008 1:02 PM (in response to leptronic)Sorry, let me try to explain better. Lets say I have 2 tabs. Tab1 contains inputText1 and button1 backed by InputBean1. Tab2 contains inputText2 and button2 backed by InputBean2. When I click button2, I don't want InputBean1 to process. Is there a way to do that?
-
3. Re: Any way to limit which backing beans process?
sergeysmirnov May 2, 2008 1:07 PM (in response to leptronic)1. code snippets.
2. scopes of the beans -
4. Re: Any way to limit which backing beans process?
leptronic May 2, 2008 4:23 PM (in response to leptronic)Ok, I narrowed it down. It seems to be an issue with the dataTable. When I submit from tab1, it is trying to load the table on tab2. I don't want that to process until I select or submit from tab2.
The beans are session scoped. Code below:
<!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:ui="http://java.sun.com/jsf/facelets"
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">
<ui:composition>
<rich:tabPanel switchType="ajax">
<rich:tab label="First">
<h:form id="form1">
<h:panelGrid columns="3" id="one">
<h:outputText value="Name:" />
<h:inputText value="#{bean.name}" />
<a4j:commandButton value="Go" reRender="one" />
</h:panelGrid>
</h:form>
</rich:tab>
<rich:tab label="Second">
<h:form id="form2">
<h:panelGrid columns="3" id="two">
<h:outputText value="Name:" />
<h:inputText value="#{bean2.name}" />
<a4j:commandButton value="Go" reRender="two" />
</h:panelGrid>
<rich:dataTable width="250" value="#{bean2.products}"
var="viewitem" cellpadding="1" cellspacing="1">
<rich:column width="120" style="text-align: center;">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Name" />
</f:facet>
<h:outputText value="#{viewitem.name}" />
</rich:column>
<rich:column width="120" style="text-align: center;">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Value" />
</f:facet>
<h:outputText value="#{viewitem.value}" />
</rich:column>
</rich:dataTable>
</h:form>
</rich:tab>
</rich:tabPanel>
</ui:composition> -
5. Re: Any way to limit which backing beans process?
ilya_shaikovsky May 3, 2008 7:16 AM (in response to leptronic)wrap your content inside form to
<a4j:region renderRegionOnly="true">
Isuue for examination added.
http://jira.jboss.com/jira/browse/RF-3341 -
6. Re: Any way to limit which backing beans process?
leptronic May 5, 2008 9:28 AM (in response to leptronic)Thank you for your response. That did help. However it caused a different problem. I have a commandLink within the table that rerenders a component outside of the region. Now that component doesn't rerender. Is there a way to override the renderRegionOnly from the server side?
-
7. Re: Any way to limit which backing beans process?
leptronic May 5, 2008 6:57 PM (in response to leptronic)My workaround was to place a container panel within each tab, then when selectedTab is set, set render to false on all the container panels within other tabs.
-
8. Re: Any way to limit which backing beans process?
dxxvi May 6, 2008 6:45 AM (in response to leptronic)"leptronic" wrote:
My workaround was to place a container panel within each tab, then when selectedTab is set, set render to false on all the container panels within other tabs.
Did you do that in Java code or xhtml code? If you do it in xhtml code, is it possible to share your knowledge?