首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在可视强制页中使用列

在可视强制页中使用列
EN

Stack Overflow用户
提问于 2016-01-26 19:16:32
回答 1查看 3.1K关注 0票数 1

我有一个记录领域,我是一个收入细分。我需要我的列看起来像它们在图片中所做的,这是我将要显示的代码,但我需要左列中的收入分类在右边列的底部。

当我尝试时,我会在页面块项下得到不能超过两个子元素的错误。

代码语言:javascript
复制
<apex:page standardController="EventPackageRevenueBreakdown__c"
extensions="EventPackageRevenueBreakdownExt" standardStylesheets="true"
tabstyle="EventPackageRevenueBreakdown__c">
<apex:form >
    <apex:pageBlock mode="edit"
        title="Event Package Revenue Breakdown Edit">
        <apex:pageblockbuttons >
            <apex:commandbutton action="{!save}" value="{!$Label.Package_Save}"></apex:commandbutton>
            <apex:commandbutton action="{!SaveAndNew}"
                value="{!$Label.Package_SaveAndNew}"></apex:commandbutton>
            <apex:commandbutton action="{!cancel}"
                value="{!$Label.Package_Cancel}"></apex:commandbutton>
        </apex:pageblockbuttons>
        <apex:pagemessages ></apex:pagemessages>
        <apex:pageblocksection id="PackageEventInformationPBS"
            title="{!$Label.Package_Information}">
            <apex:pageBlockSectionItem >
                <apex:outputpanel layout="block" styleClass="requiredInput"></apex:outputpanel>
            </apex:pageBlockSectionItem>
            <apex:outputpanel layout="block" styleClass="requiredBlock"></apex:outputpanel>
            <apex:inputfield required="true"
                value="{!EventPackageRevenueBreakdown__c.UnitPrice__c}"></apex:inputfield>
            <apex:inputfield required="true"
                value="{!EventPackageRevenueBreakdown__c.Location__c}"></apex:inputfield>
            <apex:inputfield required="true"
                value="{!EventPackageRevenueBreakdown__c.Name}"></apex:inputfield>
            <apex:outputfield value="{!EventPackageRevenueBreakdown__c.BookingPackageEvent__c}" />
                                <apex:inputfield required="true"
                value="{!EventPackageRevenueBreakdown__c.RevenueClassification__c}"></apex:inputfield>
        </apex:pageblocksection>
        <apex:pageblocksection title="Admin and Gratuity">
            <apex:pageBlockSectionItem >
                <apex:outputpanel layout="block" styleClass="requiredInput"></apex:outputpanel>
            </apex:pageBlockSectionItem>
            <apex:outputpanel layout="block" styleClass="requiredBlock"></apex:outputpanel>
            <apex:inputfield required="false"
                value="{!eventItem.AdminCharge__c}"></apex:inputfield>
            <apex:inputfield required="false" value="{!eventItem.Gratuity__c}"></apex:inputfield>
        </apex:pageblocksection>
    </apex:pageBlock>
</apex:form>
</apex:page>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-01-26 22:04:22

如果pageBlockSection被设置为两列(我相信是默认的),那么它将显示它的字段:左->右,然后向下一行,然后再左->右。

要将字段推倒,可以添加一个空的pageBlockSectionItem

您应该像这样布局您的字段:

代码语言:javascript
复制
<apex:pageblocksection id="PackageEventInformationPBS" title="{!$Label.Package_Information}" columns="2">
    <apex:inputfield required="true" value="{!EventPackageRevenueBreakdown__c.UnitPrice__c}"/>
    <apex:inputfield required="true" value="{!EventPackageRevenueBreakdown__c.Location__c}"/>
    <apex:inputfield required="true" value="{!EventPackageRevenueBreakdown__c.Name}"/>
    <apex:outputfield value="{!EventPackageRevenueBreakdown__c.BookingPackageEvent__c}"/>
    </apex:pageBlockSectionItem> <!-- empty selectItem--> <apex:pageBlockSectionItem/>
    <apex:inputfield required="true" value="{!EventPackageRevenueBreakdown__c.RevenueClassification__c}"/>
</apex:pageblocksection>
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35022004

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档