1

In VisualFlow you can create multiple screens, as many as you like, but at the end it is considered one Flow, and when you create a website from the Flow, its only one website.

How can you create multiple screens for one VisualForce page?

I guess if i want to be more specific, the following opportunity wizard example:

http://www.salesforce.com/us/developer/docs/pages/Content/pages_quick_start_wizard.htm

Has three pages, If i want to make this a public website, Then i would need to host three pages instead of one,

So is it possible to host one website that refers to all three pages?

1 Answer 1

2

It really depends on what you are trying to accomplish.

The rendered tag can help a lot in these situations. Technically speaking it's all on one page, and you can show and hide sections using the below method. I think you could even use some javascript remoting, but if you're going to go that far then jQuery would probably be just as easy

For example though:

Visualforce:

<apex:page controller="testController">
    <apex:form >
        <apex:commandButton action="{!toggleText}" value="Toggle"/>
    </apex:form>
    <apex:outputText rendered="{!showText}" value="this is some test text"/>
</apex:page>

Controller:

public class testController {
    public void toggleText() {
        showText = !showText;
    }
    public Boolean showText { get; set; }
    public testController() {
        //set default
        this.showText = true;
    }
}

Also, the above is to show it can be done. You might want to handle the button using page references etc, as that's how it's meant to be done.

4
  • hmm, sounds like a good idea Commented Oct 25, 2013 at 14:56
  • I guess if i want to be more specific, the following opportunity wizard example: salesforce.com/us/developer/docs/pages/Content/… ; has three pages, if i want to make this a public website, then i would need to host three pages instead of one, so is it possible to host one website that refers to all three pages? Commented Oct 25, 2013 at 16:06
  • If you're willing to put a url parameter into the link then that could work. so if you had na1.salesforce.com/apex/TestPage?TestParam=Hello%20World you could do rendered="{!$CurrentPage.parameters.TestParam == 'Hello World'}" to show/hide sections. If you're going to hack together links thought, surely multiple pages would suit better?
    – Ben Naylor
    Commented Oct 28, 2013 at 4:38
  • I like the idea, i'm just surprised that this is a work around and Salesforce does not have a direct solution. Commented Oct 28, 2013 at 11:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .