Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <apex:page showHeader="true" sidebar="false" standardController="Meal__c" tabStyle="Meal__c" extensions="MealDetailController" title="Meal Detail">
- <apex:sectionHeader title="Meal Edit" subtitle="{!IF(Meal__c.name != '',Meal__c.name,'New Meal')}"/>
- <apex:form id="form">
- <apex:actionFunction status="LoadStatusPart" name="processFilterChange" action="{!processFilterChange}" rerender="pgBlkData,pgBlkSecSummary"/>
- <apex:actionStatus id="LoadStatusPart">
- <apex:facet name="start">
- <img src="/img/loading.gif" /> Please wait. Loading...
- </apex:facet>
- </apex:actionStatus>
- <apex:pageBlock id="pgblk" mode="edit">
- <apex:pageMessages/>
- <apex:pageBlockButtons location="top">
- <apex:commandButton action="{!saveResult}" value="Save"/>
- <apex:commandButton action="{!cancel}" value="Cancel"/>
- </apex:pageBlockButtons>
- <apex:pageBlockSection title="Meal Details" columns="2">
- <apex:inputField value="{!meal.Customer__c}" required="true"/>
- <apex:inputField value="{!meal.Status__c}" required="true"/>
- <apex:inputField value="{!meal.Date__c}" required="true"/>
- </apex:pageBlockSection>
- <apex:pageBlockSection title="Sumary" columns="2" id="pgBlkSecSummary">
- <apex:outputPanel rendered="{!!IF(chartDataList.size>0,true,false)}">
- <apex:pageMessage summary="No Items have been added to this meal." severity="info" strength="3" />
- </apex:outputPanel>
- <apex:outputPanel rendered="{!IF(chartDataList.size>0,true,false)}">
- <apex:chart data="{!chartDataList}" height="100%" width="100%">
- <apex:pieSeries labelField="name" dataField="data"/>
- <apex:legend position="right"/>
- </apex:chart>
- </apex:outputPanel>
- <apex:outputPanel rendered="{!IF(chartDataList.size>0,true,false)}">
- <apex:pageBlockTable value="{!summaryTableProducts}" var="prod">
- <apex:column >
- <apex:facet name="header">Name</apex:facet>
- <apex:outputLink value="/{!prod.Id}" target="_blank">{!prod.name}</apex:outputLink>
- </apex:column>
- <apex:column value="{!prod.Grams_of_Protein__c}"/>
- <apex:column value="{!prod.Grams_of_Fat__c}"/>
- <apex:column value="{!prod.Grams_of_Carbohydrates__c}"/>
- </apex:pageBlockTable>
- </apex:outputPanel>
- </apex:pageBlockSection>
- <apex:pageBlockSection title="Meal Options" columns="1" id="pgBlkData">
- <apex:pageBlockSectionItem>
- Product Family
- **<apex:actionRegion>
- <apex:selectList value="{!filterString}" multiselect="false" size="1" id="filterString">
- <apex:selectOptions value="{!familyOptions}"/>
- <apex:actionSupport event="onchnage" action="{!processFilterChange}" status="LoadStatusPart" rerender="pgblk"/>
- </apex:selectList>
- </apex:actionRegion>**
- </apex:pageBlockSectionItem>
- <apex:pageBlockSectionItem>
- <apex:pageBlockTable value="{!productMenuItemUIList}" var="wrap">
- <apex:column >
- <apex:facet name="header">Quantity</apex:facet>
- <apex:inputField value="{!wrap.mealItem.Quantity__c}" required="true"/>
- </apex:column>
- <apex:column >
- <apex:facet name="header">Product Name</apex:facet>
- <apex:outputField value="{!wrap.prod2.name}"/>
- </apex:column>
- <apex:column >
- <apex:facet name="header">Product Family</apex:facet>
- <apex:outputField value="{!wrap.prod2.family}"/>
- </apex:column>
- <apex:column >
- <apex:facet name="header">Grams of Protein</apex:facet>
- <apex:outputField value="{!wrap.prod2.Grams_of_Protein__c}"/>
- </apex:column>
- <apex:column >
- <apex:facet name="header">Grams of Fat</apex:facet>
- <apex:outputField value="{!wrap.prod2.Grams_of_Fat__c}"/>
- </apex:column>
- <apex:column >
- <apex:facet name="header">Grams of Carbs</apex:facet>
- <apex:outputField value="{!wrap.prod2.Grams_of_Carbohydrates__c}"/>
- </apex:column>
- <apex:column >
- <apex:facet name="header">Quanity Remaining</apex:facet>
- <apex:outputField value="{!wrap.prod2.Quantity_Remaining__c}"/>
- </apex:column>
- </apex:pageBlockTable>
- </apex:pageBlockSectionItem>
- <apex:pageBlockSectionItem id="pgBlkSecNavItem">
- **<!--<apex:actionRegion>
- <apex:commandButton rendered="{!con.hasPrevious}" value="First">
- <apex:actionSupport event="onclick" action="{!navFirst}" rerender="pgblk"/>
- </apex:commandButton>
- </apex:actionRegion>
- <apex:actionRegion>
- <apex:commandButton rendered="{!con.hasNext}" value="Next">
- <apex:actionSupport event="onclick" action="{!navNext}" status="LoadStatusPart" rerender="pgblk"/>
- </apex:commandButton>
- </apex:actionRegion>-->**
- <apex:outputPanel>
- <apex:commandButton action="{!navFirst}" rendered="{!con.hasPrevious}" value="First" rerender="pgBlkData,pgBlkSecSummary"/>
- <apex:commandButton action="{!navPrev}" rendered="{!con.hasPrevious}" value="Previous" rerender="pgBlkData,pgBlkSecSummary"/>
- Page <apex:outputText value="{!con.pageNumber}"/> of <apex:outputText value="{!numberOfPages}"/>
- <apex:commandButton action="{!navNext}" rendered="{!con.hasNext}" value="Next" rerender="pgBlkData,pgBlkSecSummary"/>
- <apex:commandButton action="{!navLast}" rendered="{!con.hasNext}" value="Last" rerender="pgBlkData,pgBlkSecSummary"/>
- </apex:outputPanel>
- </apex:pageBlockSectionItem>
- </apex:pageBlockSection>
- </apex:pageBlock>
- </apex:form>
- </apex:page>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement