Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.82 KB | None | 0 0
  1. <apex:page showHeader="true" sidebar="false" standardController="Meal__c" tabStyle="Meal__c" extensions="MealDetailController" title="Meal Detail">
  2. <apex:sectionHeader title="Meal Edit" subtitle="{!IF(Meal__c.name != '',Meal__c.name,'New Meal')}"/>
  3. <apex:form id="form">
  4. <apex:actionFunction status="LoadStatusPart" name="processFilterChange" action="{!processFilterChange}" rerender="pgBlkData,pgBlkSecSummary"/>
  5. <apex:actionStatus id="LoadStatusPart">
  6. <apex:facet name="start">
  7. <img src="/img/loading.gif" />&nbsp;Please wait. Loading...
  8. </apex:facet>
  9. </apex:actionStatus>
  10. <apex:pageBlock id="pgblk" mode="edit">
  11. <apex:pageMessages/>
  12. <apex:pageBlockButtons location="top">
  13. <apex:commandButton action="{!saveResult}" value="Save"/>
  14. <apex:commandButton action="{!cancel}" value="Cancel"/>
  15. </apex:pageBlockButtons>
  16. <apex:pageBlockSection title="Meal Details" columns="2">
  17. <apex:inputField value="{!meal.Customer__c}" required="true"/>
  18. <apex:inputField value="{!meal.Status__c}" required="true"/>
  19. <apex:inputField value="{!meal.Date__c}" required="true"/>
  20. </apex:pageBlockSection>
  21. <apex:pageBlockSection title="Sumary" columns="2" id="pgBlkSecSummary">
  22. <apex:outputPanel rendered="{!!IF(chartDataList.size>0,true,false)}">
  23. <apex:pageMessage summary="No Items have been added to this meal." severity="info" strength="3" />
  24. </apex:outputPanel>
  25. <apex:outputPanel rendered="{!IF(chartDataList.size>0,true,false)}">
  26. <apex:chart data="{!chartDataList}" height="100%" width="100%">
  27. <apex:pieSeries labelField="name" dataField="data"/>
  28. <apex:legend position="right"/>
  29. </apex:chart>
  30. </apex:outputPanel>
  31. <apex:outputPanel rendered="{!IF(chartDataList.size>0,true,false)}">
  32. <apex:pageBlockTable value="{!summaryTableProducts}" var="prod">
  33. <apex:column >
  34. <apex:facet name="header">Name</apex:facet>
  35. <apex:outputLink value="/{!prod.Id}" target="_blank">{!prod.name}</apex:outputLink>
  36. </apex:column>
  37. <apex:column value="{!prod.Grams_of_Protein__c}"/>
  38. <apex:column value="{!prod.Grams_of_Fat__c}"/>
  39. <apex:column value="{!prod.Grams_of_Carbohydrates__c}"/>
  40. </apex:pageBlockTable>
  41. </apex:outputPanel>
  42. </apex:pageBlockSection>
  43. <apex:pageBlockSection title="Meal Options" columns="1" id="pgBlkData">
  44. <apex:pageBlockSectionItem>
  45. Product Family
  46. **<apex:actionRegion>
  47. <apex:selectList value="{!filterString}" multiselect="false" size="1" id="filterString">
  48. <apex:selectOptions value="{!familyOptions}"/>
  49. <apex:actionSupport event="onchnage" action="{!processFilterChange}" status="LoadStatusPart" rerender="pgblk"/>
  50. </apex:selectList>
  51. </apex:actionRegion>**
  52. </apex:pageBlockSectionItem>
  53. <apex:pageBlockSectionItem>
  54. <apex:pageBlockTable value="{!productMenuItemUIList}" var="wrap">
  55. <apex:column >
  56. <apex:facet name="header">Quantity</apex:facet>
  57. <apex:inputField value="{!wrap.mealItem.Quantity__c}" required="true"/>
  58. </apex:column>
  59. <apex:column >
  60. <apex:facet name="header">Product Name</apex:facet>
  61. <apex:outputField value="{!wrap.prod2.name}"/>
  62. </apex:column>
  63. <apex:column >
  64. <apex:facet name="header">Product Family</apex:facet>
  65. <apex:outputField value="{!wrap.prod2.family}"/>
  66. </apex:column>
  67. <apex:column >
  68. <apex:facet name="header">Grams of Protein</apex:facet>
  69. <apex:outputField value="{!wrap.prod2.Grams_of_Protein__c}"/>
  70. </apex:column>
  71. <apex:column >
  72. <apex:facet name="header">Grams of Fat</apex:facet>
  73. <apex:outputField value="{!wrap.prod2.Grams_of_Fat__c}"/>
  74. </apex:column>
  75. <apex:column >
  76. <apex:facet name="header">Grams of Carbs</apex:facet>
  77. <apex:outputField value="{!wrap.prod2.Grams_of_Carbohydrates__c}"/>
  78. </apex:column>
  79. <apex:column >
  80. <apex:facet name="header">Quanity Remaining</apex:facet>
  81. <apex:outputField value="{!wrap.prod2.Quantity_Remaining__c}"/>
  82. </apex:column>
  83. </apex:pageBlockTable>
  84. </apex:pageBlockSectionItem>
  85. <apex:pageBlockSectionItem id="pgBlkSecNavItem">
  86. **<!--<apex:actionRegion>
  87. <apex:commandButton rendered="{!con.hasPrevious}" value="First">
  88. <apex:actionSupport event="onclick" action="{!navFirst}" rerender="pgblk"/>
  89. </apex:commandButton>
  90. </apex:actionRegion>
  91. <apex:actionRegion>
  92. <apex:commandButton rendered="{!con.hasNext}" value="Next">
  93. <apex:actionSupport event="onclick" action="{!navNext}" status="LoadStatusPart" rerender="pgblk"/>
  94. </apex:commandButton>
  95. </apex:actionRegion>-->**
  96. <apex:outputPanel>
  97. <apex:commandButton action="{!navFirst}" rendered="{!con.hasPrevious}" value="First" rerender="pgBlkData,pgBlkSecSummary"/>
  98. <apex:commandButton action="{!navPrev}" rendered="{!con.hasPrevious}" value="Previous" rerender="pgBlkData,pgBlkSecSummary"/>
  99. Page&nbsp;<apex:outputText value="{!con.pageNumber}"/> of&nbsp;<apex:outputText value="{!numberOfPages}"/>
  100. <apex:commandButton action="{!navNext}" rendered="{!con.hasNext}" value="Next" rerender="pgBlkData,pgBlkSecSummary"/>
  101. <apex:commandButton action="{!navLast}" rendered="{!con.hasNext}" value="Last" rerender="pgBlkData,pgBlkSecSummary"/>
  102. </apex:outputPanel>
  103. </apex:pageBlockSectionItem>
  104. </apex:pageBlockSection>
  105. </apex:pageBlock>
  106. </apex:form>
  107. </apex:page>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement