-
1. a4j rerender issues
snaker Mar 3, 2011 6:59 AM (in response to narvava)How do you try to call the method??? Have you try with actionListener????
-
2. a4j rerender issues
narvava Mar 3, 2011 7:10 AM (in response to snaker)Hi Kike,
Yes I tried actionListener and action both with a4j support. No action is getting performed. But at the same time, if I load the rich combo box directly(without radio button action), a4j is working
-
3. a4j rerender issues
snaker Mar 3, 2011 7:34 AM (in response to narvava)Can you include the code of the combo box?
-
4. a4j rerender issues
narvava Mar 3, 2011 7:36 AM (in response to snaker)I tried with all possible events like onchange and onselect
<rich:column style="align:center">
<h:panelGroup id="dynamicComponentGroups" style="border: 0px">
<h:panelGrid style="text-align:center;border: 0px">
<rich:comboBox id="componentGroupname"
value="#{componentMapping.selectedCompGroupName}"
defaultLabel="Select ComponentGroup">
<f:selectItems value="#{componentMapping.componentGroupNames}" />
<a4j:support event="onchange"
action="#{componentMapping.fetchGroupNames}"
BypassUpdates="false" reRender="componentGroupValue"
id="comboAjax" status="waitStatusadmin">
</a4j:support>
</rich:comboBox></h:panelGrid>
</h:panelGroup>
</rich:column> -
5. a4j rerender issues
snaker Mar 3, 2011 8:07 AM (in response to narvava)I use richfaces 4 and i can't use a4j:support , but, have you tried with valueChangeListener???
<rich:comboBox id="componentGroupname" value="#{componentMapping.selectedCompGroupName}" defaultLabel="Select ComponentGroup"
valueChangeListener="#{componentMapping.fetchGroupNames}">
<f:selectItems value="#{componentMapping.componentGroupNames}" />
<a4j:support event="onchange" BypassUpdates="false" reRender="componentGroupValue" id="comboAjax" status="waitStatusadmin"> </a4j:support>
</rich:comboBox>
You try it
-
6. a4j rerender issues
narvava Mar 3, 2011 9:34 AM (in response to snaker)hi ,
I need to rerender here so a4j support is must for me.
Posting my full code here...If I remove radio button code here and load rest of the components by default a4j support is working here.
I have been struggling since last 10 days with this problem. Could anybody look into this and let me know what exactly I m doing wrong here.
<rich:panel>
<f:facet name="header">
<h:outputText value="#{messages['admin.comp.compmap']}"
style="font-size:100%">
<rich:spacer width="40%" />
</h:outputText>
</f:facet>
<h:panelGrid columns="1" width="100%">
<h:selectOneRadio value="#{compAdminHelper.typeOfOperation}"
styleClass="oncallFonts" id="componentMapRadio">
<f:selectItem id="newComponent"
itemLabel="#{messages['admin.comp.newcomp']}"
style="font-weight:bold" itemValue="newComponent">
</f:selectItem>
<f:selectItem id="existingComp"
itemLabel="#{messages['admin.comp.existingcomp']}"
style="font-weight:bold" itemValue="oldComponent">
</f:selectItem>
<f:selectItem id="addFunctionType"
itemLabel="#{messages['admin.comp.functionType']}"
style="font-weight:bold" itemValue="addFunction">
</f:selectItem>
<a4j:support event="onclick" status="waitStatusadmin"
action="#{compAdminHelper.enableComponentPanel}"
reRender="newCompPanelWrpr,newCompGrid,oldcompPanel,oldCompGrid,newCompGridPanel" />
</h:selectOneRadio>
</h:panelGrid>
</rich:panel><a4j:region selfRendered="true" immediate="true" id="compReqion">
<a4j:outputPanel id="newCompGridPanel">
<h:panelGrid id="newCompGrid" columns="2"
style="rich-sdt-header-cell"
rendered="#{compAdminHelper.enableNewComp}">
<h:column>
<rich:dataTable id="techInfoTable" value="" var="info"
rendered="true">
<f:facet name="header">
<rich:columnGroup styleClass="rich-table-headercell">
<rich:column>
<h:outputText value="#{messages['comp.inv.comp']}" />
</rich:column>
<rich:column>
<h:outputText value="#{messages['comp.inv.compGroup']}" />
</rich:column>
<rich:column>
<h:outputText value="Function Type" />
</rich:column>
</rich:columnGroup>
</f:facet>
<rich:column style="align:center">
<h:panelGroup style="border: 0px">
<h:panelGrid style="text-align:center;border: 0px">
<h:selectOneListbox style="width: 250px;"
value="#{componentMapping.selectedCompName}" size="10">
<f:selectItems value="#{componentNames}" />
</h:selectOneListbox>
</h:panelGrid>
</h:panelGroup>
</rich:column>
<rich:column style="align:center">
<h:panelGroup id="dynamicComponentGroups" style="border: 0px">
<h:panelGrid style="text-align:center;border: 0px"><rich:comboBox
value="#{componentMapping.selectedCompGroupName}"
rendered="true" id="componentGroupname" width="200px"
defaultLabel="Select Function Type">
<f:selectItems
value="#{componentMapping.componentGroupNames}" />
<a4j:support event="onselect" status="waitStatusadmin"
action="#{componentMapping.fetchGroupNames}"
reRender="componentGroupValue,componentGroupId"
id="comboAjax"></a4j:support>
</rich:comboBox></h:panelGrid>
</h:panelGroup>
</rich:column>
<rich:column style="align:center">
<h:panelGroup style="border: 0px" id="componentGroupId">
<h:panelGrid style="text-align:center;border: 0px">
<rich:comboBox
value="#{componentMapping.selectedCompGroupValue}"
rendered="true" id="componentGroupValue" width="200px"
defaultLabel="Select Function Type">
<f:selectItems
value="#{componentMapping.componentGroupValues}" />
</rich:comboBox>
</h:panelGrid>
</h:panelGroup>
</rich:column>
</rich:dataTable>
</h:column>
<h:column>
<a4j:commandButton immediate="true" ajaxSingle="true"
actionListener="#{componentMapping.mapSelectedNodeToGroup}"
value="Map Node" status="waitStatus" />
</h:column>
</h:panelGrid>
</a4j:outputPanel>
</a4j:region>