You need to sign in to do that
Don't have an account?
Swapnil Patne
Displaying fields inside two block sections in Visualforce page
Hi,
Need some help identifying what am I doing wrong here?
With below code, I am trying to display account field inside the two block sections side by side but for some reasons fields don't show up. surely I am missing something here but can't figure it out.
Please can someone help?
Code:
<apex:page standardController="Account" sidebar="false">
<apex:form >
<apex:pageBlock title="{!account.name}" >
<apex:pageBlockButtons >
<apex:commandButton value="Edit" action="{!edit}"/>
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Details">
<apex:pageBlockTable value="{!Account}" var="a" columns="4" >
<apex:column headerValue="Quantitative" />
<apex:outputField value="{! Account.ownerid }" />
<apex:outputField value="{! Account.Phone }"/>
<apex:outputField value="{! Account.Name }"/>
<apex:outputField value="{! Account.Industry }"/>
<apex:outputField value="{! Account.Account_flag__c }"/>
<apex:outputField value="{! Account.Tier_Bucket__c}"/>
<apex:outputField value="{! Account.NPS__c }"/>
<apex:outputField value="{! Account.M_A_activity__c}"/>
</apex:pageBlockTable>
<apex:pageBlockTable value="{!Account}" var="b">
<apex:column headerValue="Qualitative"/>
<apex:outputField value="{! Account.TL_score__c }"/>
<apex:outputField value="{! Account.Missed_calls__c }"/>
<apex:outputField value="{! Account.Adverse_financial_warnings__c }"/>
<apex:outputField value="{! Account.Change_of_CEO__c }"/>
<apex:outputField value="{! Account.Change_of_exec_sponsor__c }"/>
<apex:inlineEditSupport event="ondblClick" />
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
Many thanks,
Swapnil
Need some help identifying what am I doing wrong here?
With below code, I am trying to display account field inside the two block sections side by side but for some reasons fields don't show up. surely I am missing something here but can't figure it out.
Please can someone help?
Code:
<apex:page standardController="Account" sidebar="false">
<apex:form >
<apex:pageBlock title="{!account.name}" >
<apex:pageBlockButtons >
<apex:commandButton value="Edit" action="{!edit}"/>
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Details">
<apex:pageBlockTable value="{!Account}" var="a" columns="4" >
<apex:column headerValue="Quantitative" />
<apex:outputField value="{! Account.ownerid }" />
<apex:outputField value="{! Account.Phone }"/>
<apex:outputField value="{! Account.Name }"/>
<apex:outputField value="{! Account.Industry }"/>
<apex:outputField value="{! Account.Account_flag__c }"/>
<apex:outputField value="{! Account.Tier_Bucket__c}"/>
<apex:outputField value="{! Account.NPS__c }"/>
<apex:outputField value="{! Account.M_A_activity__c}"/>
</apex:pageBlockTable>
<apex:pageBlockTable value="{!Account}" var="b">
<apex:column headerValue="Qualitative"/>
<apex:outputField value="{! Account.TL_score__c }"/>
<apex:outputField value="{! Account.Missed_calls__c }"/>
<apex:outputField value="{! Account.Adverse_financial_warnings__c }"/>
<apex:outputField value="{! Account.Change_of_CEO__c }"/>
<apex:outputField value="{! Account.Change_of_exec_sponsor__c }"/>
<apex:inlineEditSupport event="ondblClick" />
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
Many thanks,
Swapnil
Use variables instead of our list name.
e.g. value="{! Account.ownerid }" should be value="{! a.ownerid }"
try this for all and see if it works.
Chintan
When we are trying to iterate records using PageblockTable with StandardController, we should use "recordSetVar".
I did not understand your usage of ColumnHeaderValue and InlineEdit. Do you want to edit all the fields ?
However, I modified your code and it will display the fields.
Let me know if taht helps you.
Best Regards,
BALAJI
Thank you for your reply and helping me out.
With ColumnHeaderValue I want to name those boxes i.e. Box A = Quantitative and Box B = Qualitative and display relevant fields under them, wilth capability to inline edit all.
Here my aim is to show two boxes side by side Quantitative & Qualitative and display relevant fields under them.
I tried your code, but I get following error:
Error: <apex:column> must be the direct child of either <apex:dataTable> or <apex:pageBlockTable>
Thanks,
Swapnil
Please try below code with capability of Inline edit all.
Best Regards,
BALAJI