I have a select list set to mutliselect in a Visualforce page. However, when i go to save the records only the first ten selected values are returned.

This an example debug before saving:

10:52:16:273 USER_DEBUG [151]|DEBUG|this.day (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...)

Is there any reason for it to be cut off?

                    <apex:selectList value="{!day}" size="8" multiselect="true" style="width:240px"   styleClass="slds-select daysmonth"  >
                    <apex:selectOption itemValue="1" itemLabel="1"/>
                    <apex:selectOption itemValue="2" itemLabel="2"/>
                    <apex:selectOption itemValue="3" itemLabel="3"/>
                    <apex:selectOption itemValue="4" itemLabel="4"/>
                    <apex:selectOption itemValue="5" itemLabel="5"/>
                    <apex:selectOption itemValue="6" itemLabel="6"/>
                    <apex:selectOption itemValue="7" itemLabel="7"/>
                    <apex:selectOption itemValue="8" itemLabel="8"/>
                    <apex:selectOption itemValue="9" itemLabel="9"/>
                    <apex:selectOption itemValue="10" itemLabel="10"/>
                    <apex:selectOption itemValue="11" itemLabel="11"/>
                    <apex:selectOption itemValue="12" itemLabel="12"/>
                    <apex:selectOption itemValue="13" itemLabel="13"/>
                    <apex:selectOption itemValue="14" itemLabel="14"/>
                    <apex:selectOption itemValue="15" itemLabel="15"/>
                    <apex:selectOption itemValue="16" itemLabel="16"/>
                    <apex:selectOption itemValue="17" itemLabel="17"/>
                    <apex:selectOption itemValue="18" itemLabel="18"/>
                    <apex:selectOption itemValue="19" itemLabel="19"/>
                    <apex:selectOption itemValue="20" itemLabel="20"/>
                    <apex:selectOption itemValue="21" itemLabel="21"/>
                    <apex:selectOption itemValue="22" itemLabel="22"/>
                    <apex:selectOption itemValue="23" itemLabel="23"/>
                    <apex:selectOption itemValue="24" itemLabel="24"/>
                    <apex:selectOption itemValue="25" itemLabel="25"/>
                    <apex:selectOption itemValue="26" itemLabel="26"/>
                    <apex:selectOption itemValue="27" itemLabel="27"/>
                    <apex:selectOption itemValue="28" itemLabel="28"/>
                    <apex:selectOption itemValue="29" itemLabel="29"/>
                    <apex:selectOption itemValue="30" itemLabel="30"/>
                    <apex:selectOption itemValue="31" itemLabel="31"/>

using a string[] in the controller

public String[] day { get; set; }
  • 1
    can you try system.debug('@@@@'+JSON.serialize(this.day)) – night crawler Aug 15 '17 at 23:20
  • @DanielHowell - When you say only the first 10 are returned, are you talking about the debug log or the actual Select input on the page? If you are talking the debug log then that is normal as it is truncated to save space – Eric Aug 16 '17 at 1:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.