{"id":16981792,"url":"https://github.com/cesarparra/visualforce-layout-manager","last_synced_at":"2025-03-21T23:40:23.015Z","repository":{"id":115969694,"uuid":"143350621","full_name":"cesarParra/visualforce-layout-manager","owner":"cesarParra","description":"Create powerful UI layouts with Visualforce","archived":false,"fork":false,"pushed_at":"2018-08-05T15:25:46.000Z","size":1281,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T17:03:37.834Z","etag":null,"topics":["apex","salesforce","ui","ui-components","ui-design","visualforce","visualforce-component","visualforce-page"],"latest_commit_sha":null,"homepage":"","language":"Apex","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cesarParra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-02T22:26:26.000Z","updated_at":"2024-03-19T17:38:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"42c9befb-92cc-4a97-91ed-f50f6c1422d8","html_url":"https://github.com/cesarParra/visualforce-layout-manager","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesarParra%2Fvisualforce-layout-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesarParra%2Fvisualforce-layout-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesarParra%2Fvisualforce-layout-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesarParra%2Fvisualforce-layout-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cesarParra","download_url":"https://codeload.github.com/cesarParra/visualforce-layout-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244885515,"owners_count":20526293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apex","salesforce","ui","ui-components","ui-design","visualforce","visualforce-component","visualforce-page"],"created_at":"2024-10-14T02:06:29.168Z","updated_at":"2025-10-14T12:10:39.912Z","avatar_url":"https://github.com/cesarParra.png","language":"Apex","funding_links":[],"categories":[],"sub_categories":[],"readme":"Control your Visualforce layouts through code.\n\n# Usage\n\nDeploy this repository to your scratch org using [Salesforce    DX](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_develop.htm) or deploy the directories inside of [force-app/main/src](https://github.com/cesarParra/visualforce-layout-manager/tree/master/force-app/main/src)    to your org.\n\n## Getting Started\nTo create the layout of your page first create a VF Page or component and add the following to your controller\n\n    public View getView() {\n\t    ...\n\t    // Build and return the layout for your page following the instructions below.\n\t    ...\n    }\nThen, in your VF Page or component add the following:\n\n    \u003capex:outputPanel  layout=\"block\"  styleClass=\"container\"\u003e\n\t    \u003capex:dynamicComponent invokeAfterAction=\"true\" componentValue=\"{!View.Component}\" /\u003e\n\t\u003c/apex:outputPanel\u003e\n\n## Building your layout\n\n### Views\nThe View interface is the basis for the entire layout. Everything that gets presented in the page is a View.\n\nCreating a layout is all based on two different views: HorizontalView and VerticalView. These two views are container views that do not have any layout, but just control the flow of the layout.\nAs their name implies the HorizontalView is a view that can contain views that will be displayed horizontally, and the VerticalView is a view that can contain views that will be displayed vertically.\n\nHere is an example of what you can do when combining different views to build your layout:\n\n    public  View  getView() {\n\t    ViewGroup  horizontalViewGroup  =  new  HorizontalView(3);\n\t    horizontalViewGroup.addChild(new  CardView().setHeader('Hello World').setTitle('First child of horizontal view'));\n\t\n\t    ViewGroup  verticalViewGroup  =  new  VerticalView();\n\t    verticalViewGroup.addChild(new  CardView().setTitle('First child of vertical view within horizontal view'));\n\t\t\n\t    ViewGroup  horizontalGrandChild  =  new  HorizontalView(2);\n\t    horizontalGrandChild.addChild(new  CardView().setTitle('First child of horizontal view within vertical view within horizontal view'));\n\t    horizontalGrandChild.addChild(new  CardView().setTitle('Second child of horizontal view within vertical view within horizontal view'));\n\t\t\n\t    verticalViewGroup.addChild(horizontalGrandChild);\n\t    verticalViewGroup.addChild(new  SeparatorView());\n\n\t    verticalViewGroup.addChild(new  CardView().setTitle('Fourth child of vertical view within horizontal view, the separator before me is the third'));\n\n\t    verticalViewGroup.addChild(new  TextView('Im just a TextView and the last child of the vertical view within the horizontal view'));\n\t    horizontalViewGroup.addChild(verticalViewGroup);\n\n\t    ViewGroup  horizontalChild  =  new  HorizontalView(2);\n\t    horizontalChild.addChild(new  CardView().setTitle('First child of horizontal view within horizontal view'));\n\t    horizontalChild.addChild(new  CardView().setTitle('Second child of horiztontal view within horizontal view'));\n\n\t    horizontalViewGroup.addChild(horizontalChild);\n\t    return  horizontalViewGroup;\n    }\n\nWhich results in a layout that looks like this:\n![Example Image](https://raw.githubusercontent.com/cesarParra/visualforce-layout-manager/master/images/example-layout.PNG)\n\nAs you can see, you can use any combination of vertical and horizontal views with other types of views (like cards, separators, and text views) to create the desired layout.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesarparra%2Fvisualforce-layout-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcesarparra%2Fvisualforce-layout-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesarparra%2Fvisualforce-layout-manager/lists"}