You need to sign in to do that
Don't have an account?
uHaveOptions
Getting this error. Error: Unsupported attribute relatedlist in <apex:inputField>
My goal is to separate the section of the record and separate them by tabs. I understand that you have to use <apex:inputfield> for each field if you want them to show in your tab and also I need them to be editable using inlineEdit="true" I dont understand why I'm getting unsupported attribute relatedlist. I have to remove Relatedlist & InlineEdit for it to function but when I look at the preview its just a box...
Thoughts?
Thanks in advance and Happy Holidays
<apex:page standardController="Property__c" showHeader="true" sidebar="false">
<!-- Define Tab panel .css styles -->
<style>
.activeTab {background-color: #081f3f; color:white; background-image:none}
.inactiveTab { background-color: lightgrey; color:black; background-image:none}
</style>
<!-- Create Tab panel -->
<apex:tabPanel switchType="client" selectedTab="Property__c" id="AccountTabPanel"
tabClass="activeTab" inactiveTabClass="inactiveTab">
<apex:tab label="Property Information" name="name1" id="tabOne">content for tab one</apex:tab>
<apex:form>
<apex:pageBlock title="My Content" mode="edit">
<apex:pageBlockButtons>
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="My Content Section" columns="2">
<apex:inputField value="{!Property__c.Name}" relatedList="false" inlineEdit="true"/>
<apex:inputField value="{!Property__c.Address}" relatedList="false" inlineEdit="true"/>
<apex:inputField value="{!Property__c.City}" relatedList="false" inlineEdit="true"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
<apex:tab label="Building Information" name="name2" id="tabTwo">content for tab two</apex:tab>
<apex:tab label="Financial Information" name="name3" id="tabThree">content for tab two</apex:tab>
<apex:tab label="Loan Information" name="name4" id="tabFour">content for tab two</apex:tab>
</apex:tabPanel>
</apex:page>
So again, the goal is to have fields in each tabs and have the capability to edit.
Thanks
Thoughts?
Thanks in advance and Happy Holidays
<apex:page standardController="Property__c" showHeader="true" sidebar="false">
<!-- Define Tab panel .css styles -->
<style>
.activeTab {background-color: #081f3f; color:white; background-image:none}
.inactiveTab { background-color: lightgrey; color:black; background-image:none}
</style>
<!-- Create Tab panel -->
<apex:tabPanel switchType="client" selectedTab="Property__c" id="AccountTabPanel"
tabClass="activeTab" inactiveTabClass="inactiveTab">
<apex:tab label="Property Information" name="name1" id="tabOne">content for tab one</apex:tab>
<apex:form>
<apex:pageBlock title="My Content" mode="edit">
<apex:pageBlockButtons>
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="My Content Section" columns="2">
<apex:inputField value="{!Property__c.Name}" relatedList="false" inlineEdit="true"/>
<apex:inputField value="{!Property__c.Address}" relatedList="false" inlineEdit="true"/>
<apex:inputField value="{!Property__c.City}" relatedList="false" inlineEdit="true"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
<apex:tab label="Building Information" name="name2" id="tabTwo">content for tab two</apex:tab>
<apex:tab label="Financial Information" name="name3" id="tabThree">content for tab two</apex:tab>
<apex:tab label="Loan Information" name="name4" id="tabFour">content for tab two</apex:tab>
</apex:tabPanel>
</apex:page>
So again, the goal is to have fields in each tabs and have the capability to edit.
Thanks
All Answers
(inputfield: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_inputField.htm)
I think to achieve what you are after, could you perhaps have used mode="inlineEdit" on the pageblock (where you have mode="edit" ) and then the inputfields should use the inline edit widget where available (as described in the mode bit of the docs here..)
(pageblock mode docs: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_pageBlock.htm)
No need for the inline attribute on the element then either.