• Cindy Norman
  • NEWBIE
  • 40 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 32
    Replies
I’ve tried so many ways to try to make this work but can’t get it to behave.  Other posts seem to indicate that this doesn’t work. But i really need it so here goes..

In the apex controller code MainControllerClass…
public Boolean ABCCheckbox {get; set;} 
public Boolean IsABC { 
       get{if (appl==null) return false;     
           if (appl.rating__c==‘ABC’) return true; return false;} set;}   

…startup, so not null or otherwise wonky...
ABCCheckbox           = false; 

…later & before page loads, ABCCheckbox set true…
if (appl.rating__c==‘ABC’) ABCCheckbox = true;
In the page...
<apex:page controller="MainControllerClass" >
 <apex:form id="abcForm">
 <apex:pageBlock >
  <apex:outputPanel styleClass="panelWrapper" layout="block">
…
 <apex:outputPanel id="abcDetailPanel" layout="block">
    <apex:pageblocksection id="abcDetail"> 
…            
        <apex:pageBlockSectionItem >
          <apex:outputLabel value=“Check if ABC applies?”/>
          <apex:inputCheckbox value="{!HBCheckbox}" selected="{!IsABC}"/>
       </apex:pageBlockSectionItem>
…
    </apex:pageblocksection>
  </apex:outputPanel>
...
  </apex:outputPanel>
  </apex:pageBlock>
  </apex:form>
</apex:page>
I've also tried this...
<apex:pageBlockSectionItem >
          <apex:outputLabel value=“Check if ABC applies?”>
          <apex:outputPanel layout="block">
             <apex:actionRegion >
            <apex:inputCheckbox value="{!ABCCheckbox}" selected="{!IF(appl.rating__c==‘ABC’,true,false)}" >
             </apex:actionRegion>
          </apex:outputPanel>       
       </apex:pageBlockSectionItem>
…and if i do this, it is checked but that doesn’t help except shows me “selected” *can* work sometimes…
<apex:pageBlockSectionItem >
          <apex:outputLabel value=“Check if ABC applies?”>
          <apex:outputPanel layout="block">
             <apex:actionRegion >
            <apex:inputCheckbox value="{!ABCCheckbox}" selected=“true” >
             </apex:actionRegion>
          </apex:outputPanel>       
 </apex:pageBlockSectionItem>

When i check the value of ABCCheckbox, it is indeed checked if the user checks it. I just can’t load the page with it already checked.


 
I don't ever want my ENTER button to do anything.
Does anyone know how to disable it without having to put an onkeypress type event on each input field?
I have about 200 input fields of various types (inputField, inputText, radio buttons, ...)
and some commandButtons that i want them to specifically Push to fire.
I have a popup...pretty simple use of a form, a couple of outputPanels and a couple of commandButtons (shown below
...probably don't need to explain the little bits, or do i?).
I'm wondering if i can *force* the user to click one of the buttons before any more input is taken on the screen...
ie in effect "disabling" everything else on the screen until they choose 1 button or the other.
Any ideas?
Thank You!

<apex:form >
  <apex:outputPanel id="ShowPopup">
        <apex:outputPanel styleClass="popupBackground" layout="block" rendered="{!displayPopup2Buttons}"/>
        <apex:outputPanel styleClass="custPopup" layout="block" rendered="{!displayPopup2Buttons}">
            <apex:outputLabel escape="false" value="{!messageInPopup}"/>
            <br/><br/><br/>
            <apex:commandButton style="align:center;" value="{!buttonLabel1}" action="{!closePopup}" rerender="ShowPopup">
                <apex:param name="popupButtonChosen" value="1" assignTo="{!popupButtonChosen}" />
            </apex:commandButton>
            <apex:commandButton value="{!buttonLabel2}" style="align:center;" action="{!closePopup}" rerender="ShowPopup">
                <apex:param name="popupButtonChosen" value="2" assignTo="{!popupButtonChosen}" />
            </apex:commandButton>
        </apex:outputPanel>
  </apex:outputPanel>
</apex:form>
What is the best way to split large Apex Source Code (for 1 controller) into separate source files?
These PageBlockSections are so nice and big. Has anyone ever put buttons inside the title stripe? ... ie have the Title over on the left and a couple of commandButtons on the right? 
Kind of like PageBlock and PageBlockButtons.
Thanks!
HI-If the user clicks a tab, i would like to know what tab that is. How do i poll or otherwise find out which tab is active?

(I saw one post that was fairly complicated and from 2012. Isn't there an easy way to do this by now? I just simply want
the id or the name or anything. Thanks!)
Hi-I'm sure this is a no-brainer for all of you guys but i'm having trouble with this. I'll be general because i'm not sure what part of my code is messed up.

************
I have some apex:inputFields that display data from a custom object- this works fine

                 <apex:outputLabel value="Number of Dependents on Application" styleClass="inputFieldLabelStyle"/>
                 <apex:inputfield value="{!application.numberOfDependents__c }" styleClass="inputFieldStyle"/>
              </apex:pageBlockSectionItem>
*************
AND a button that fires correctly when the user clicks it:

            <apex:commandButton value="Save and Continue" style="width:180px;" action="{!SaveApp}" immediate="true" rerender="ApplicationSubTabPanel,showmsgs"/>
**************
And the method defined in the controller:
    public PageReference SaveApp() 
    {
        try {        
                upsert(application);
        } catch(System.DMLException e) {      ....       }
        return null; //tells VF to refresh page.    
    }//end PageReference SaveApp()

**********
Pretty easy stuff. But the values never get saved in the DB. Any silliness that i have overlooked? an "onchange" or ?

Thank you!!
I have something like this for a nice Title to my pageblock:

<apex:pageBlock id="appPageBlock" title="Application for : {!application.FirstName__c} {!application.MiddleName__c} {!application.LastName__c}">  

with some buttons like this one:
 <apex:pageBlockButtons>
            <apex:commandButton value="Save and Continue" style="...">
</apex:pageBlockButtons>
 
The only way i can change the font color on the Title is to use a facet for "header". However, when i do this, i lose my buttons....they just disappear.

Anyone have a trick as to how to change the font color without losing my buttons?
(I ONLY want to change the font color for my Title...nothing else on the page)

Thank you!

I have 3 tabs on my page. When i say "Edit" on one tab (using apex:commandLink), i want to render the details of a record on another tab.
But I'm having trouble getting the other tab's pageblocksections to rerender.
Does the rerender have a scope criteria?


Thanks!
From the sparse documentation at
http://www.salesforce.com/us/developer/docs/pages/Content/pages_flows_customize_runtime_ui.htm
It looks like we can change the style of the input LABELS but not the input AREAS.
So there is always a mismatch.
It doesn't do much good to be able to change just the look of the labels without changing the look of the input areas as well.
Does anyone know how to do this?
Is this a bug or am i missing something?

I have a tabPanel and 2 Tabs within the Panel (tabEmpty and tabChart). Unless i have the tabPanel point (eg set selectedTab="tabChart" ) to the Tab with the Chart in it, tabChart, the chart won't show up (it actually shows up but crammed way up into the left corner with just a few pixels showing.)

What am i missing? If you change the selectedTab to tabChart, you'll see it correctly.
Here's the code:

**********the page***************
<apex:page controller="PieChartController" title="Pie Chart">
    <apex:tabPanel switchType="client" selectedTab="tabEmpty" id="AccountTabPanel">
 
    <!--    **************Empty Tab *********************************-->
    <apex:tab label="Empty Tab" name="tabEmpty" id="tabEmpty">
    </apex:tab>

    <!--    **************Tab with a Chart***************************-->
    <apex:tab label="Chart Tab" name="tabChart" id="tabChart">
        <apex:chart resizable="true" height="350" width="450" data="{!pieData}">
            <apex:pieSeries dataField="data" labelField="name"/>
            <apex:legend position="right"/>
        </apex:chart>
    </apex:tab>
    
    </apex:tabPanel>    
</apex:page>


**********and the PieChartController controller***************
public class PieChartController {
    public List<PieWedgeData> getPieData() {
        List<PieWedgeData> data = new List<PieWedgeData>();
        data.add(new PieWedgeData('Jan', 30));
        data.add(new PieWedgeData('Feb', 15));
        data.add(new PieWedgeData('Mar', 10));
        data.add(new PieWedgeData('Apr', 20));
        data.add(new PieWedgeData('May', 20));
        data.add(new PieWedgeData('Jun', 5));
        return data;
    }

    // Wrapper class
    public class PieWedgeData {

        public String name { get; set; }
        public Integer data { get; set; }

        public PieWedgeData(String name, Integer data) {
            this.name = name;
            this.data = data;
        }
    }
}
I have something like this for a nice Title to my pageblock:

<apex:pageBlock id="appPageBlock" title="Application for : {!application.FirstName__c} {!application.MiddleName__c} {!application.LastName__c}">  

with some buttons like this one:
 <apex:pageBlockButtons>
            <apex:commandButton value="Save and Continue" style="...">
</apex:pageBlockButtons>
 
The only way i can change the font color on the Title is to use a facet for "header". However, when i do this, i lose my buttons....they just disappear.

Anyone have a trick as to how to change the font color without losing my buttons?
(I ONLY want to change the font color for my Title...nothing else on the page)

Thank you!

I’ve tried so many ways to try to make this work but can’t get it to behave.  Other posts seem to indicate that this doesn’t work. But i really need it so here goes..

In the apex controller code MainControllerClass…
public Boolean ABCCheckbox {get; set;} 
public Boolean IsABC { 
       get{if (appl==null) return false;     
           if (appl.rating__c==‘ABC’) return true; return false;} set;}   

…startup, so not null or otherwise wonky...
ABCCheckbox           = false; 

…later & before page loads, ABCCheckbox set true…
if (appl.rating__c==‘ABC’) ABCCheckbox = true;
In the page...
<apex:page controller="MainControllerClass" >
 <apex:form id="abcForm">
 <apex:pageBlock >
  <apex:outputPanel styleClass="panelWrapper" layout="block">
…
 <apex:outputPanel id="abcDetailPanel" layout="block">
    <apex:pageblocksection id="abcDetail"> 
…            
        <apex:pageBlockSectionItem >
          <apex:outputLabel value=“Check if ABC applies?”/>
          <apex:inputCheckbox value="{!HBCheckbox}" selected="{!IsABC}"/>
       </apex:pageBlockSectionItem>
…
    </apex:pageblocksection>
  </apex:outputPanel>
...
  </apex:outputPanel>
  </apex:pageBlock>
  </apex:form>
</apex:page>
I've also tried this...
<apex:pageBlockSectionItem >
          <apex:outputLabel value=“Check if ABC applies?”>
          <apex:outputPanel layout="block">
             <apex:actionRegion >
            <apex:inputCheckbox value="{!ABCCheckbox}" selected="{!IF(appl.rating__c==‘ABC’,true,false)}" >
             </apex:actionRegion>
          </apex:outputPanel>       
       </apex:pageBlockSectionItem>
…and if i do this, it is checked but that doesn’t help except shows me “selected” *can* work sometimes…
<apex:pageBlockSectionItem >
          <apex:outputLabel value=“Check if ABC applies?”>
          <apex:outputPanel layout="block">
             <apex:actionRegion >
            <apex:inputCheckbox value="{!ABCCheckbox}" selected=“true” >
             </apex:actionRegion>
          </apex:outputPanel>       
 </apex:pageBlockSectionItem>

When i check the value of ABCCheckbox, it is indeed checked if the user checks it. I just can’t load the page with it already checked.


 
I don't ever want my ENTER button to do anything.
Does anyone know how to disable it without having to put an onkeypress type event on each input field?
I have about 200 input fields of various types (inputField, inputText, radio buttons, ...)
and some commandButtons that i want them to specifically Push to fire.
I have a popup...pretty simple use of a form, a couple of outputPanels and a couple of commandButtons (shown below
...probably don't need to explain the little bits, or do i?).
I'm wondering if i can *force* the user to click one of the buttons before any more input is taken on the screen...
ie in effect "disabling" everything else on the screen until they choose 1 button or the other.
Any ideas?
Thank You!

<apex:form >
  <apex:outputPanel id="ShowPopup">
        <apex:outputPanel styleClass="popupBackground" layout="block" rendered="{!displayPopup2Buttons}"/>
        <apex:outputPanel styleClass="custPopup" layout="block" rendered="{!displayPopup2Buttons}">
            <apex:outputLabel escape="false" value="{!messageInPopup}"/>
            <br/><br/><br/>
            <apex:commandButton style="align:center;" value="{!buttonLabel1}" action="{!closePopup}" rerender="ShowPopup">
                <apex:param name="popupButtonChosen" value="1" assignTo="{!popupButtonChosen}" />
            </apex:commandButton>
            <apex:commandButton value="{!buttonLabel2}" style="align:center;" action="{!closePopup}" rerender="ShowPopup">
                <apex:param name="popupButtonChosen" value="2" assignTo="{!popupButtonChosen}" />
            </apex:commandButton>
        </apex:outputPanel>
  </apex:outputPanel>
</apex:form>
What is the best way to split large Apex Source Code (for 1 controller) into separate source files?
These PageBlockSections are so nice and big. Has anyone ever put buttons inside the title stripe? ... ie have the Title over on the left and a couple of commandButtons on the right? 
Kind of like PageBlock and PageBlockButtons.
Thanks!
This Error Occur when save any class or pages: Failed to create createContainerMember for containerId=undefined: null is not a valid containerId