• Florian Katenbrink
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies
Hey everyone,
I am having trouble with a select-box. This problem only occurs on iPhones, not on Android. I am using bootstrap-sf1.
So I have a select-box:
<apex:actionFunction name="filtertime" status="statusfilter" reRender="inadvance" action="{!queryHolidays}">
    <apex:param value="" name="timefilter" assignTo="{!InAdvanceTo}" />
    <apex:param value="true" name="queryinadvance" assignTo="{!QueryDataInAdvance}" />
</apex:actionFunction>

<select id="selectfiltertime" class="form-control" onchange="filtertime(this.options[this.selectedIndex].value);">
    <apex:repeat value="{!InAdvanceToValues}" var="fil">
	<option value="{!fil.Value}">{!fil.Label}</option>
    </apex:repeat>
</select>

Depending where I put this select-box, when I press it on my iPhone, the screen jumps to the top of my page and closes the select-box dialog to pick the values.
If the select-box is below this:
<div class="panel panel-info">
    <div class="panel-heading">Today</div>
    <div class="panel-body">
        "Some content"
    </div>
</div>
then the problem occurs. If I put my select-box above this, there is no problem.
The "Some content" is an outputpanel and within three repeats.

So this works:
.......

<select id="selectfiltertime" class="form-control" onchange="filtertime(this.options[this.selectedIndex].value);">
    <apex:repeat value="{!InAdvanceToValues}" var="fil">
        <option value="{!fil.Value}">{!fil.Label}</option>
    </apex:repeat>
</select>

<div class="panel panel-info">
    <div class="panel-heading">Today</div>
    <div class="panel-body">
        <apex:outputpanel id="now">
            <apex:outputpanel id="ooo1" rendered="{!HasDataNow}">
                <h3>Out Of Office</h3>
            </apex:outputpanel>
            <apex:repeat value="{!DataNow}" var="item">
                <div class="well well-sm">
                    <div class="media">
                        <img width="48px" height="48px" src="{!item.PhotoURL}" class="pull-left" />
                        <div class="media-body">
                            <apex:outpupanel>

                            .......

                            </apex:outputpanel>

                            .......

                        </div>

                        .......

                    </div>
                </div>
            </apex:repeat>

            .......

        </apex:outputpanel>
    </div>
</div>

.......
And this doesn't:
.......

<div class="panel panel-info">
    <div class="panel-heading">Today</div>
    <div class="panel-body">
        <apex:outputpanel id="now">
            <apex:outputpanel id="ooo1" rendered="{!HasDataNow}">
                <h3>Out Of Office</h3>
            </apex:outputpanel>
            <apex:repeat value="{!DataNow}" var="item">
                <div class="well well-sm">
                    <div class="media">
                        <img width="48px" height="48px" src="{!item.PhotoURL}" class="pull-left" />
                        <div class="media-body">
                            <apex:outpupanel>

                            .......

                            </apex:outputpanel>

                            .......

                        </div>

                        .......

                    </div>
                </div>
            </apex:repeat>

            .......

        </apex:outputpanel>
    </div>
</div>

<select id="selectfiltertime" class="form-control" onchange="filtertime(this.options[this.selectedIndex].value);">
    <apex:repeat value="{!InAdvanceToValues}" var="fil">
        <option value="{!fil.Value}">{!fil.Label}</option>
    </apex:repeat>
</select>

.......

I don't know how else to describe this problem.
Do you need more code?

Best regards,
Florian
Hey everyone,
when I call sforce.one.createRecord, then it sometimes open two new forms.
So it opens the dialog 1:
User-added image

And above this:
User-added image

This means I click cancel on the bottom one and then come to the first one. But the first one is only showing the progress bar.
I use a dropdown to select from the different record types I have ...
<div class="dropdown">
        <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown">
            New Request
            <span class="caret"></span>
        </button>
        <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
            <apex:repeat value="{!RecTypes}" var="rec">
                <li style="text-align:left;" role="presentation">
                    <a role="menuitem" href="javascript:void(0)" onclick="createNewRequestDD('{!rec.Value}');">{!rec.Label}</a>
                </li>
        </apex:repeat>
    </ul>
</div>

... and then call a javascript function:
function createNewRequestDD(val) {
    HolidayFormsInitialExtension.getRecTypeId(
        val, 
        function(result, event){
            sforce.one.createRecord('Holiday_Form__c', result);
        }
    );
}

This behavior only occurs sometimes. Sometimes it works, sometimes it doesn't.

Best regards,
Florian
Hey everyone,
I have a couple of record types for an Object. It filters my picklists correctly according to the settings in "Picklists Available for Editing" in a new record form.
However this does not apply to Salesforce1.
I have only 1 selected value for the picklist, so in Salesforce it only shows this 1 value. In Salesforce1 I can select from all values.

Is this a bug?

Best regards,
Florian
Hey everyone,
I am having trouble with a select-box. This problem only occurs on iPhones, not on Android. I am using bootstrap-sf1.
So I have a select-box:
<apex:actionFunction name="filtertime" status="statusfilter" reRender="inadvance" action="{!queryHolidays}">
    <apex:param value="" name="timefilter" assignTo="{!InAdvanceTo}" />
    <apex:param value="true" name="queryinadvance" assignTo="{!QueryDataInAdvance}" />
</apex:actionFunction>

<select id="selectfiltertime" class="form-control" onchange="filtertime(this.options[this.selectedIndex].value);">
    <apex:repeat value="{!InAdvanceToValues}" var="fil">
	<option value="{!fil.Value}">{!fil.Label}</option>
    </apex:repeat>
</select>

Depending where I put this select-box, when I press it on my iPhone, the screen jumps to the top of my page and closes the select-box dialog to pick the values.
If the select-box is below this:
<div class="panel panel-info">
    <div class="panel-heading">Today</div>
    <div class="panel-body">
        "Some content"
    </div>
</div>
then the problem occurs. If I put my select-box above this, there is no problem.
The "Some content" is an outputpanel and within three repeats.

So this works:
.......

<select id="selectfiltertime" class="form-control" onchange="filtertime(this.options[this.selectedIndex].value);">
    <apex:repeat value="{!InAdvanceToValues}" var="fil">
        <option value="{!fil.Value}">{!fil.Label}</option>
    </apex:repeat>
</select>

<div class="panel panel-info">
    <div class="panel-heading">Today</div>
    <div class="panel-body">
        <apex:outputpanel id="now">
            <apex:outputpanel id="ooo1" rendered="{!HasDataNow}">
                <h3>Out Of Office</h3>
            </apex:outputpanel>
            <apex:repeat value="{!DataNow}" var="item">
                <div class="well well-sm">
                    <div class="media">
                        <img width="48px" height="48px" src="{!item.PhotoURL}" class="pull-left" />
                        <div class="media-body">
                            <apex:outpupanel>

                            .......

                            </apex:outputpanel>

                            .......

                        </div>

                        .......

                    </div>
                </div>
            </apex:repeat>

            .......

        </apex:outputpanel>
    </div>
</div>

.......
And this doesn't:
.......

<div class="panel panel-info">
    <div class="panel-heading">Today</div>
    <div class="panel-body">
        <apex:outputpanel id="now">
            <apex:outputpanel id="ooo1" rendered="{!HasDataNow}">
                <h3>Out Of Office</h3>
            </apex:outputpanel>
            <apex:repeat value="{!DataNow}" var="item">
                <div class="well well-sm">
                    <div class="media">
                        <img width="48px" height="48px" src="{!item.PhotoURL}" class="pull-left" />
                        <div class="media-body">
                            <apex:outpupanel>

                            .......

                            </apex:outputpanel>

                            .......

                        </div>

                        .......

                    </div>
                </div>
            </apex:repeat>

            .......

        </apex:outputpanel>
    </div>
</div>

<select id="selectfiltertime" class="form-control" onchange="filtertime(this.options[this.selectedIndex].value);">
    <apex:repeat value="{!InAdvanceToValues}" var="fil">
        <option value="{!fil.Value}">{!fil.Label}</option>
    </apex:repeat>
</select>

.......

I don't know how else to describe this problem.
Do you need more code?

Best regards,
Florian