GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - cesarParra/visualforce-layout-manager: Create powerful UI layouts with Visualforce

BranchesTags
Open more actions menu

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
.sfdx
.sfdx
 
 
.vscode
.vscode
 
 
config
config
 
 
force-app/main/src
force-app/main/src
 
 
images
images
 
 
.forceignore
.forceignore
 
 
.gitattributes
.gitattributes
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
sfdx-project.json
sfdx-project.json
 
 

Repository files navigation

Control your Visualforce layouts through code.

Usage

Deploy this repository to your scratch org using Salesforce DX or deploy the directories inside of force-app/main/src to your org.

Getting Started

To create the layout of your page first create a VF Page or component and add the following to your controller

public View getView() {
    ...
    // Build and return the layout for your page following the instructions below.
    ...
}

Then, in your VF Page or component add the following:

<apex:outputPanel  layout="block"  styleClass="container">
    <apex:dynamicComponent invokeAfterAction="true" componentValue="{!View.Component}" />
</apex:outputPanel>

Building your layout

Views

The View interface is the basis for the entire layout. Everything that gets presented in the page is a View.

Creating 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. As 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.

Here is an example of what you can do when combining different views to build your layout:

public  View  getView() {
    ViewGroup  horizontalViewGroup  =  new  HorizontalView(3);
    horizontalViewGroup.addChild(new  CardView().setHeader('Hello World').setTitle('First child of horizontal view'));

    ViewGroup  verticalViewGroup  =  new  VerticalView();
    verticalViewGroup.addChild(new  CardView().setTitle('First child of vertical view within horizontal view'));
	
    ViewGroup  horizontalGrandChild  =  new  HorizontalView(2);
    horizontalGrandChild.addChild(new  CardView().setTitle('First child of horizontal view within vertical view within horizontal view'));
    horizontalGrandChild.addChild(new  CardView().setTitle('Second child of horizontal view within vertical view within horizontal view'));
	
    verticalViewGroup.addChild(horizontalGrandChild);
    verticalViewGroup.addChild(new  SeparatorView());

    verticalViewGroup.addChild(new  CardView().setTitle('Fourth child of vertical view within horizontal view, the separator before me is the third'));

    verticalViewGroup.addChild(new  TextView('Im just a TextView and the last child of the vertical view within the horizontal view'));
    horizontalViewGroup.addChild(verticalViewGroup);

    ViewGroup  horizontalChild  =  new  HorizontalView(2);
    horizontalChild.addChild(new  CardView().setTitle('First child of horizontal view within horizontal view'));
    horizontalChild.addChild(new  CardView().setTitle('Second child of horiztontal view within horizontal view'));

    horizontalViewGroup.addChild(horizontalChild);
    return  horizontalViewGroup;
}

Which results in a layout that looks like this: Example Image

As 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.

About

Create powerful UI layouts with Visualforce

Topics

apexsalesforceuiui-componentsui-designvisualforcevisualforce-componentvisualforce-page

Resources

Readme
MIT license
Activity

Stars

4 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.