2

I am having a custom object where there is a list within a list within a list. On the Visualforce page I am presenting it using an apex:repeat and apex:inputText fields.

When I try to change and send it back to the controller. The apex-repeat seems to only pick up the change done on the last field that was rendered through the repeat tag. Is there a limitation that is causing this?

<apex:repeat value="{!domainObjNameList}" var="ed" >
    <apex:variable var="prntList" value="{!ed.Can2List}" />    
    <apex:repeat value="{!prntList}" var="prnt" >
        <apex:variable var="wedL" value="{!prnt.wList}" />    
        <apex:repeat value="{!wedL}" var="wed" >   
            <div>
                <apex:inputText value="{!wed.name}">
                </apex:inputText>
            </div>
        </apex:repeat>
    </apex:repeat>
</apex:repeat>

1 Answer 1

1

believe it could be because you are using the variable to hold the inner collection / value which gets overwritten and only the last value gets retained in the variable.

you don't need a variable while doing nested iterations.. you can directly iterate on the nested collections like below.

<apex:repeat value="{!domainObjNameList}" var="ed" >
    <apex:repeat value="{!ed.Can2List}" var="prnt" >
        <apex:repeat value="{!prnt.wList}" var="wed" >   
            <div>
                <apex:inputText value="{!wed.name}">
                </apex:inputText>
            </div>
        </apex:repeat>
    </apex:repeat>
</apex:repeat>
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .