For a long time, I was trying to find out why there have been extra lines on my VF page and I just figured it out. Its due to me wrapping an outer panel with another outer panel. What I'm trying to do is reRender a section inside an output panel but for some reason, I had to wrap it around another output panel which makes no sense to me. I just want to remove the extra lines on my VF page.

VF :

<apex:outputPanel id="op1">
  <apex:outputPanel rendered="{!listToMigrate!=null}">
       <apex:pageBlockTable columns="1" id="t1" rows="5" value="{!listToMigrate}" var="temp">
            <apex:column width="5px;">
               <apex:facet name="header">Child Objects to Move </apex:facet>
               <apex:outputpanel >

If I comment out the outer output panel then it just doesn't render. Why is that? And how do we go around this??


For your wrapper outputPanel op1 set layout ="none" and then inside that put your conditionally rendered components.

You need the outer panel because if inner components are not rendered when page is constructed server-side, you cant reference those components later. By using wrapper op1 with no layout, you can request a re-render of it and its components anytime.

  • Didn't work...lol – user2582622 Aug 11 '16 at 22:49
  • More info - are you trying to rerender the outer component ? – CloudHugger Aug 11 '16 at 23:02
  • I want to only reRender everything inside the inner outer panel but without the wrapper, it doesn't work. And even setting the outer output panel as layout="none" it still didn't work – user2582622 Aug 11 '16 at 23:19
  • Can you see the outer wrapper in dom, and how are you referencing the element to rerender ? Are you using $component.opp1 ? – CloudHugger Aug 12 '16 at 0:38

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.