+ Start a Discussion
anveshvarma.k.v1.3880486882520505E12anveshvarma.k.v1.3880486882520505E12 

How to display two outputpanels in the same page horizontally i.e.,on X-axis

Actually i need two output panels in the same page...could any one give me the brief description about it...im new to force.com...so give as detailed as psooible so that i could understand easily
Best Answer chosen by anveshvarma.k.v1.3880486882520505E12
Vinita_SFDCVinita_SFDC
Also if you wish to repeat similar structure you can use <apex:repeat> attribute.

Refer: https://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_repeat.htm

All Answers

Vinita_SFDCVinita_SFDC
Hello,

Create a component with output panel and include that component in visualforce page twice with different attributes. You can refer sample code in the below mentioned link.

http://salesforce.stackexchange.com/questions/8130/can-we-use-a-custom-visualforce-component-twice-on-the-same-visualforce-page
anveshvarma.k.v1.3880486882520505E12anveshvarma.k.v1.3880486882520505E12
<apex:page >
  <apex:form >
       <apex:outputpanel style="width:1000px;">
           <apex:outputPanel style="width=300px;">
               <apex:pageblock >
                   <apex:outputText style="font-style:italic" value="This is liva it">
                   </apex:outputText> 
               </apex:pageblock>
           </apex:outputPanel>
           <apex:outputPanel style="width=700px;">
               <apex:pageblock >
                    <b><i><apex:commandLink value="Owner" style="font-family:verdana;"/></i></b> &nbsp; &nbsp; &nbsp;
                    <b><i><apex:commandLink value="New Apartment" style="font-family:verdana;" /></i></b> &nbsp; &nbsp; &nbsp;
                    <b><i><apex:commandLink value="New House" style="font-family:verdana;" /></i></b> &nbsp; &nbsp; &nbsp;
                    <b><i><apex:commandLink value="New Payment" style="font-family:verdana;"/></i></b> &nbsp; &nbsp; &nbsp;
               </apex:pageblock>
           </apex:outputPanel>
       </apex:outputpanel>
   </apex:form>
</apex:page>
 This was the code i have used.....so please help me if there is any mistakes in the above code..... 



Thanks and regards,
V ANVESH VARMA KANUMURI
Vinita_SFDCVinita_SFDC
Hello,

Refer this sample code for including one output panel inside another:

<apex:selectCheckboxes value="{!countries}">
<apex:selectOptions value="{!items}"/>
</apex:selectCheckboxes><br/>
<apex:commandButton value="Test" action="{!test}" rerender="out" status="status"/>
</apex:form>
<apex:outputPanel id="out">
<apex:actionstatus id="status" startText="testing...">
<apex:facet name="stop">
<apex:outputPanel>
<p>You have selected:</p>
<apex:dataList value="{!countries}" var="c">{!c}</apex:dataList>
</apex:outputPanel>
</apex:facet>
</apex:actionstatus>
</apex:outputPanel>
</apex:page>
Vinita_SFDCVinita_SFDC
Also if you wish to repeat similar structure you can use <apex:repeat> attribute.

Refer: https://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_repeat.htm
This was selected as the best answer
anveshvarma.k.v1.3880486882520505E12anveshvarma.k.v1.3880486882520505E12
Finally i got the answer.....anywayz...thanks for your response and your reply...it helped me a lot
anveshvarma.k.v1.3880486882520505E12anveshvarma.k.v1.3880486882520505E12
LinkedIn
anveshvarma.k.v1.3880486882520505E12anveshvarma.k.v1.3880486882520505E12
Hi, I'd like to add you to my professional network on LinkedIn. - Anvesh Accept: http://www.linkedin.com/blink?simpleRedirect=3gUdjsOdjcPd30Ofkh9rCZFt65QqnpKqioRukIPbktxh3RVpkJApn9xq7cCt7dBtmtvpnhFtCVFfmJB9C5QoORBt6BSrCAJt7dBtmsJr6RBfmtKqmJzon9Q9ClQqnpKimtBkClOs3Rx9zASbjhLsT4Oqz1FbmQNsm9CbjRBfP9SbSkLrmZzbCVFp6lHrCBIbDtTtOYLeDdMt7hE&msgID=I7980826279_1&markAsRead= You received an invitation to connect. LinkedIn will use your email address to make suggestions to our members in features like People You May Know. Unsubscribe here: http://www.linkedin.com/blink?simpleRedirect=6RLoQkO9mlzsCZCsSlIond5cylOpnhQomxzhj8Bc35xrAkO9mBxrmJHdjkJpAkO9nhGrP9zhj8BonhPozxArSRHd7kTsThTrj0Q9jtAojtWpz5TrSZEoncTsml5cylTqDhUuDtWonERonoTt7gNfmNFomRB9CxHrSZxs71Is69Ns6Fzd3RAqm4CcjoMc38Zp6ACciQZp6BJ9zASbjhLsT4Oqz1FbmQNsm9CbjRAqmkCt7dBtmtvpnhFtCVFfmJB9B4ScSh5hSxmhD9JhB51fmVBqSZkp6BJ9DdKtjRQ9zASbjhLsT4Oqz1FbmQNsm9CbjRBfP9SbSkLrmZzbCVFp6lHrCBIbDtTtOYLeDdMt7hE&msgID=I7980826279_1&markAsRead= Learn why we included this at the following link: http://www.linkedin.com/blink?simpleRedirect=3wUdPgZp4BBr6dFt79x9DhPpnlDnSlQqnpKqjRHpipIsBlBoSBSsCljsClJrThPtmcZoioVdyQQrTdNcCEMqiRJcn5ypyQZpjYOtyZBbSRLoOVKqmhBqSVFr2VTtTsLbPFMt7hE&msgID=I7980826279_1&markAsRead= © 2014, LinkedIn Corporation. 2029 Stierlin Ct. Mountain View, CA 94043, USA