You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by bansi <ma...@yahoo.com> on 2007/07/18 01:19:20 UTC

reRender on click of RadioButton shows Blank Page

I am unable to reRender the values on the  click of RadioButton . It shows
blank page
Here is the code snippet
[code]
	<div style="overflow:auto; width:85%; height:125px">	
				
	    <h:dataTable id="deviceDetailTable"  styleClass="list" 
rowClasses="odd,even" 
	                 value="#{updateDeviceBean.tableRows}" var="vartableRow"                  	                 
	                 >
	         
	         <h:column id="column1">
					<a4j:region>	
				<t:selectOneRadio id="interfaceId"
value="#{updateDeviceBean.deviceInterface.id}" >	
																			
						   <f:selectItem itemLabel="" itemValue="#{vartableRow.id}" />
						   <a4j:support
action="#{updateDeviceBean.loadDeviceInterfaceDetails}" event="onclick"  
reRender="interfacePanel" />  
				</t:selectOneRadio>
				<h:message for="interfaceId" />
				</a4j:region>
			</h:column>
	         
      		
<h:column/>
<h:column/>
</h:dataTable>	
			
		</div>




<a4j:outputPanel id="interfacePanel" >
			   <h:panelGrid columns="3" styleClass="detail" columnClasses="label"> 
			   		
			               <h:outputLabel><h:outputText  value="MAC" />
</h:outputLabel>
									<h:inputText  id="mac"
value="#{updateDeviceBean.deviceInterface.mac}" />
					     	 	    <h:message for="mac" />
					
			
							           <h:outputLabel> <h:outputText value="Status" />
</h:outputLabel>
							            <h:selectOneMenu id="status"
value="#{updateDeviceBean.interfaceStatus}"  >
							            		<f:selectItem itemLabel="" itemValue="" />               
								                 <f:selectItems
value="#{updateDeviceBean.interfaceStatusList}" />		                 
							            </h:selectOneMenu> 
							            <h:message for="status" />  
		 			        </h:panelGrid>
			   </a4j:outputPanel> 
[/code]

Any pointers/suggestions will be highly appreciated

-- 
View this message in context: http://www.nabble.com/reRender-on-click-of-RadioButton-shows-Blank-Page-tf4100085.html#a11659656
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: reRender on click of RadioButton shows Blank Page

Posted by David Delbecq <de...@oma.be>.
several remarks:

1) each of your radio buttons will be in separated groups, because their
id will be different (something like
form:deviceDetailTable:x:interfaceId) where x is row number. You'd
better have a <f:selectItems
value="#{someBean.somePropertyThatGenerateList}"> and remove that datatable.
2) the reRender value of your a4j:support (interfacePanel) does not
resolve to any existing component because there is no component named
form:deviceDetailTable:x:interfacePanel. See docs of a4j and docs on
UIComponent.findComponent() refered to by a4j docs.
3) Check a4j is properly configured and your generated xhtml is valid.
Use 'limitToList="true"' to ensure your don't get a blank page that
replace existing in case of failure, check for javascript error message,
check for server message, sniff the wire to see the XmlHttpRequest
response from server.




En l'instant précis du 18/07/07 01:19, bansi s'exprimait en ces termes:
> I am unable to reRender the values on the  click of RadioButton . It shows
> blank page
> Here is the code snippet
> [code]
> 	<div style="overflow:auto; width:85%; height:125px">	
> 				
> 	    <h:dataTable id="deviceDetailTable"  styleClass="list" 
> rowClasses="odd,even" 
> 	                 value="#{updateDeviceBean.tableRows}" var="vartableRow"                  	                 
> 	                 >
> 	         
> 	         <h:column id="column1">
> 					<a4j:region>	
> 				<t:selectOneRadio id="interfaceId"
> value="#{updateDeviceBean.deviceInterface.id}" >	
> 																			
> 						   <f:selectItem itemLabel="" itemValue="#{vartableRow.id}" />
> 						   <a4j:support
> action="#{updateDeviceBean.loadDeviceInterfaceDetails}" event="onclick"  
> reRender="interfacePanel" />  
> 				</t:selectOneRadio>
> 				<h:message for="interfaceId" />
> 				</a4j:region>
> 			</h:column>
> 	         
>       		
> <h:column/>
> <h:column/>
> </h:dataTable>	
> 			
> 		</div>
>
>
>
>
> <a4j:outputPanel id="interfacePanel" >
> 			   <h:panelGrid columns="3" styleClass="detail" columnClasses="label"> 
> 			   		
> 			               <h:outputLabel><h:outputText  value="MAC" />
> </h:outputLabel>
> 									<h:inputText  id="mac"
> value="#{updateDeviceBean.deviceInterface.mac}" />
> 					     	 	    <h:message for="mac" />
> 					
> 			
> 							           <h:outputLabel> <h:outputText value="Status" />
> </h:outputLabel>
> 							            <h:selectOneMenu id="status"
> value="#{updateDeviceBean.interfaceStatus}"  >
> 							            		<f:selectItem itemLabel="" itemValue="" />               
> 								                 <f:selectItems
> value="#{updateDeviceBean.interfaceStatusList}" />		                 
> 							            </h:selectOneMenu> 
> 							            <h:message for="status" />  
> 		 			        </h:panelGrid>
> 			   </a4j:outputPanel> 
> [/code]
>
> Any pointers/suggestions will be highly appreciated
>
>   


-- 
http://www.noooxml.org/