Advertisement
Guest User

Untitled

a guest
Jul 10th, 2014
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. <apex:repeat... var="inputobj">
  2. <apex:outputpanel rendered="{!inputobj.type == 'standardinputfield'}"
  3. <apex:inputField required="{!inputobj.isRequired}" value="{!inputobj.data[f.apiName]}"
  4. </apex:outputpanel}"
  5. <apex:outputpanel rendered="{!inputobj.type == 'something'}"
  6. ...
  7. </apex:outputpanel}"
  8. <apex:outputpanel rendered="{!inputobj.type == 'something else'}"
  9. ...
  10. </apex:outputpanel}"
  11. ...
  12. </apex:repeat>
  13.  
  14. <apex:page controller="MyPageController">
  15. <apex:sectionHeader title="My Section Title" />
  16. <apex:pageMessages id="pageMessages" />
  17. <apex:form id="theForm">
  18. <apex:dynamicComponent id="dynComp" componentValue="{!ControlTree}" />
  19. </apex:form>
  20. </apex:page>
  21.  
  22. Component.Apex.InputText ctl = new Component.Apex.InputText();
  23. ctl.label = field.label;
  24. ctl.expressions.value = buildBindingExpression(field.name);
  25.  
  26. private string buildBindingExpression(string fieldName) {
  27. String expr = '{!ViewBag['' + fieldName + '']' + '}';
  28. return expr;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement