voyent
What is the ace version 4 equivalent of spread layout for ice:selectOneRadio  XML
Forum Index -> Components
Author Message
garpinc


Joined: 21/Mar/2007 00:00:00
Messages: 43
Offline


I used to have following code but can't seem to figure out how spread is supported. I see the migration guide says it's a combination of buttonGroup and radioButton but I fail to see how selectItems can be utilized in this situation based on all i've looked at.:

Code:
		<ice:selectOneRadio id="evaluationAgreementDefaultGroup" layout="spread" 
 		 	value="#{licenseBean.selectedAgreement}" partialSubmit="true" converter="genericObjectConverter"
 		 	>
 	      	 	<f:selectItems value="#{licenseBean.licenseAgreementsWithoutLabel}" />
       	 </ice:selectOneRadio>
         <ace:dataTable  var="agreementVar" value="#{licenseBean.allLicenseAgreements}" varStatus="agreementVarStatus">
 			<ace:column>
 				<f:facet name="header">Agreement</f:facet>
         		<h:commandLink style="margin:20px" action="#{licenseBean.editSoftwareAgreement(agreementVar)}" value="#{agreementVar.description}"/>
         	</ace:column>
 			<ace:column style="width:50px">
 				<f:facet name="header">Is Default?</f:facet>
         		<ice:radio for="evaluationAgreementDefaultGroup" index="#{agreementVarStatus.index}"/>
 			</ace:column>
         	<ace:column>
 				<h:commandLink value="x" action="#{licenseBean.removeSoftwareAgreement(agreementVar)}" />
 			</ace:column>
         </ace:dataTable>
garpinc


Joined: 21/Mar/2007 00:00:00
Messages: 43
Offline


Looks like it's simple in primefaces

Code:
    <p:outputPanel id="customPanel" style="margin-bottom:10px">
         <p:selectOneRadio id="customRadio" value="#{radioView.color}" layout="custom">
             <f:selectItem itemLabel="Red" itemValue="Red" />
             <f:selectItem itemLabel="Green" itemValue="Green" />
             <f:selectItem itemLabel="Blue" itemValue="Blue" />
         </p:selectOneRadio>
  
         <h:panelGrid columns="3" cellpadding="5">
             <p:radioButton id="opt1" for="customRadio" itemIndex="0" />
             <h:outputLabel for="opt1" value="Red" />
             <p:spinner />
  
             <p:radioButton id="opt2" for="customRadio" itemIndex="1" />
             <h:outputLabel for="opt2" value="Green" />
             <p:inputText />
  
             <p:radioButton id="opt3" for="customRadio" itemIndex="2" />
             <h:outputLabel for="opt3" value="Blue" />
             <p:calendar />
         </h:panelGrid>
     </p:outputPanel>
 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team