• SPruitt
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 5
    Replies

Is there a technique for padding spaces in the label when creating SelectOption instances in a controller?  The multiple spaces I put in get trimmed to a single space.

If I have a radio button defined as below everything works ok.  The field ratePlanId is updated with the selected value.

 

<apex:page controller="MyController">

   <apex:form>

      <apex:pageBlock>

           <apex:pageBlockSection id="ratePlanTable" title="Rate Plans">

                <apex:selectRadio id="ratePlanSelector" layout="pageDirection" value="{!ratePlanId}" required="true">

                     <apex:selectOptions value="{!ratePlans}"/>

                </apex:selectRadio>

            </apex:pageBlockSection>

       </apex:pageBlock>

    </apex:form>

</apex:page>

 

when I modify the page and add an additional radio button as below the ratePlanId setter is never called.  Oddly enough, from the debug log it looks the getter is called again instead of the setter.

 

             :  page block section with first radio button located here

             <apex:pageBlockSection id="ratePlanChargeTable" title="Rate Plan Charges">

                    <apex:selectRadio layout="pageDirection" value="{!ratePlanChargeId}" required="true">

                       <apex:selectOptions value="{!ratePlanCharges}"/>

                   </apex:selectRadio>

             </apex:pageBlockSection>

        </apex:pageBlock>

    </apex:form>

</apex:page>

 

Why does the presence of a second radio buttion cause the first radio button to no longer set a value when selected?

The following is defined on a VPage

 

<apex:form>

     <apex:actionFunction name="checkSameAsCustomer" action="{!sameAsCustomer}" rerender="billToSection">
          <apex:param name="checkSameAsParam" assignTo="{!isSameAsCustomer}" value="sameAsCustomerCheck.selected"/>
     </apex:actionFunction>

     <apex:pageBlock>

             :

          <apex:inputCheckbox id="sameAsCustomerCheck" label="Billing same as above" onselect="checkSameAsCustomer" immediate="true"/>

          <apex:pageBlockSection id="billToSection">

             :

 

The inputcheckbox doesn't appear to be invoking the actionFunction.  My controller's implementation of sameAsCustomer writes to the debug log, but nothing shows up.

 

I have tried setting onselect, onchange, and onclick.  Also, as a separate issue the inputcheckbox label never shows either.

 

Thanks in advance.