2

I am trying to implement in my VF page. Here is the code.

1). VF Page

<apex:page Controller="ModemTroubleShootingCustomSimple" tabStyle="Case">
    <flow:interview name="Troubleshotting_Internet_Not_Connnecting" interview="{!myflow}"/>
    <apex:outputText value="Default Case Prioriy: {!casePriority}"/>
</apex:page>

Apex class

public class ModemTroubleShootingCustomSimple {
    // Need not instantiate explicitly the Flow object using the class constructor
    public Flow.Interview.Troubleshotting_Internet_Not_Connnecting myflow { get; set; }
    public String casePriority;
    public String getcasePriority() {
        // Access flow variables as simple member variables with get/set methods
        if(myflow==null) return 'High';
        else return 'LOw';
    }
}

The above code for normal VF page is working fine

Same code for mobile development 2). VF Page

<apex:page Controller="ModemTroubleShootingCustomSimple_Mobile" tabStyle="Case" standardStylesheets="false" showHeader="false" sidebar="false">
    <!-- stylesheets and scripts, from CDN (use local files in production) -->
    <apex:stylesheet value="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.1.0/jquery.mobile-1.1.0.min.css" />
    <apex:includeScript value="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"/>
    <apex:includeScript value="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.1.0/jquery.mobile-1.1.0.min.js"/>



    <body>
        <!-- Main page, to display list of Merchandise once app starts -->
        <!-- Main page, to display list of Merchandise once app starts -->
        <div data-role="page" data-theme="b" id="mainpage">
            <!-- page header -->
            <div data-role="header">
                <!-- button for logging out -->
                <a href='#' id="link_logout" data-role="button" data-icon='delete'>
                    Log Out
                </a>
                <!-- page title -->
                <h2>Demo</h2>
            </div>
            <!-- page content -->
            <div id="#content" data-role="content">
                <!-- page title -->
                <h2>Mobile Inventory</h2>

                <!-- list of merchandise, links to detail pages -->
                <div id="div_merchandise_list">
                    <ul data-inset="true" data-role="listview" data-theme="a" data-dividertheme="a">
                        <flow:interview name="Troubleshotting_Internet_Not_Connnecting" interview="{!myflow}"/>
                        <apex:outputText value="Default Case Prioriy: {!casePriority}"/>
                    </ul>
                </div>
            </div>
        </div>


    </body>
</apex:page>

Apex Class

public class ModemTroubleShootingCustomSimple_Mobile{
    // Need not instantiate explicitly the Flow object using the class constructor
    public Flow.Interview.Troubleshotting_Internet_Not_Connnecting myflow { get; set; }
    public String casePriority;
    public String getcasePriority() {
        // Access flow variables as simple member variables with get/set methods
        if(myflow==null) return 'High';
        else return 'LOw';
    }
}

The problem is with the second that is related to mobile app. The buttons that are displayed on the mobile page works only for first time, Means if you clicked Next button once, then click event will not fire next time. Click event is firing only once and same for previous button.

4

I know that this is an old problem, but I wanted to offer an update. I created a simple flow, loaded it on a simple VF page, created a VF tab and added it to my mobile navigation options for Salesforce1. I did not have any trouble with the buttons and was pleased to see that my simple Flow worked just fine on Salesforce1. Now to try it with a more complex flow and VF page...

2
  • 1
    Have you tried with the more complex flow in the meantime? I'm thinking about doing something similar myself to split up some bigger object in smaller workable pieces but was in doubt if this would work well in Salesforce1.
    – KoenVM
    Jan 2 '14 at 15:13
  • My complex flow really needs to be on a responsive VF page.
    – snugsfbay
    Jul 22 '14 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.