• Samadhan Force
  • NEWBIE
  • 25 Points
  • Member since 2017

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 7
    Replies
<apex:page standardcontroller="Program_Member_MVN__c" extensions="CaseCounter" showHeader="false" >
    <apex:form >
        <apex:pageBlock title="Attachments" >
            <apex:pageblockSection >
           <!-- <apex:outputPanel layout="block" style="overflow:auto;width:200px;height:500px" >-->
                <apex:repeat value="{!results}" var="M" >  
                <apex:repeat value="{!M.Attachments}" var="temp"> 
                           
                     <apex:outputText label="Case Number"  >
                     <apex:outputLink value="{!URLFOR($Action.Case.View,M.Id)}" target="_blank">
                         {!M.CaseNumber}
                     </apex:outputLink>
                     </apex:outputText> 
                                            
                    <apex:outputText label="Attachment" >
                    <apex:outputLink value="{!URLFOR($Action.Attachment.Download,temp.Id)}" target="_blank">{!temp.Name}</apex:outputLink>
                    </apex:outputText>
                    
                    <apex:outputField value="{!temp.LastModifiedDate}"/>
                    
                    <apex:outputField value="{!temp.CreatedById}"/>
                </apex:repeat>
                </apex:repeat>
                <!-- </apex:OutputPanel>-->
             </apex:pageblockSection>
         </apex:pageBlock>
    </apex:form>
</apex:page>

User-added image

My visual force page is looks like above.I want to give some space after the four fields are displayed for a particular record.How can i do that with apex:repeat tag?
Hi every one,
                     Please help out Can i rerender a single input text field instead a whole section in vf?
Hi. This is my first attempt at writing visualforce code and I am at an impass. I want to target my 'path' picklist options to determine which one is active. The HTML element is the attribute 'aria-selected' true or false, so I figured it would be easy to do this by checking which one is true. I am decently experience in JS so i thought this would be easy enough to do this that way. I included jQuery put my code inside a script tag, which seems to be working, but it can't find the HTML element, or any HTML element for that matter.  I can find 'document' in the console, but it seems to only go a level or two deeper, and anything I try to target with JS or jQuery in the page itself gives me

'Uncaught TypeError: Cannot read property 'getElementsByClassName' of undefined'

.  As I said, this is my first VF experience, and I am at a loss, I'm sure there's some basic concept here I'm missing. Any help would be greatly appeciated. My code is below. Thanks.

<apex:page standardController="Application__c" extensions="appDis">
    <apex:form >
        <apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" />
            <script type="text/javascript">
            $ = jQuery.noConflict()
            var bar = document.getElementsByClassName('pa-tabBar')[0]
            var tabs = bar.getElementsByClassName('tabHeader');
            console.log(tabs)
            var stage = bar.querySelector("[aria-selected='true']").title;
            var checkbox = document.getElementById('4543:0');
         
        </script>
    </apex:form>
</apex:page>
 
How to display more than 2 columns properly in apex:repeat tag with equal spacing
when click on button whole page will be redirecting using through apex page reference method
<apex:page standardcontroller="Program_Member_MVN__c" extensions="CaseCounter" showHeader="false" >
    <apex:form >
        <apex:pageBlock title="Attachments" >
            <apex:pageblockSection >
           <!-- <apex:outputPanel layout="block" style="overflow:auto;width:200px;height:500px" >-->
                <apex:repeat value="{!results}" var="M" >  
                <apex:repeat value="{!M.Attachments}" var="temp"> 
                           
                     <apex:outputText label="Case Number"  >
                     <apex:outputLink value="{!URLFOR($Action.Case.View,M.Id)}" target="_blank">
                         {!M.CaseNumber}
                     </apex:outputLink>
                     </apex:outputText> 
                                            
                    <apex:outputText label="Attachment" >
                    <apex:outputLink value="{!URLFOR($Action.Attachment.Download,temp.Id)}" target="_blank">{!temp.Name}</apex:outputLink>
                    </apex:outputText>
                    
                    <apex:outputField value="{!temp.LastModifiedDate}"/>
                    
                    <apex:outputField value="{!temp.CreatedById}"/>
                </apex:repeat>
                </apex:repeat>
                <!-- </apex:OutputPanel>-->
             </apex:pageblockSection>
         </apex:pageBlock>
    </apex:form>
</apex:page>

User-added image

My visual force page is looks like above.I want to give some space after the four fields are displayed for a particular record.How can i do that with apex:repeat tag?
<apex:page controller="Dependentpicklist">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
   <apex:selectList value="{!selectCountry}" size="1">
        Country<apex:selectOptions value="{!Options}"/>
           <apex:actionSupport event="onchange" action="{!FetchState}" reRender="OutState"/>
</apex:selectList>
   <apex:outputPanel id="OutState">
       <apex:selectList value="{!selectState}" size="1">
            State<apex:selectOptions value="{!StateOptions}"/>
               <apex:actionSupport event="onchange" action="{!FetchDistrict}" reRender="OutDist"/>
</apex:selectList>
   <apex:outputPanel id="OutDist">
       <apex:selectList value="{!selectDistrict}" size="1">
           District<apex:selectOptions value="{!DistrictOptions}"/>
               <apex:actionSupport event="onchange" action="{!FetchVillage}" reRender="OutVig"/>
</apex:selectList>
   <apex:outputPanel id="OutVig">
       <apex:selectList value="{!selectVillage}" size="1">
           Village<apex:selectOptions value="{!VillageOptions}"/>
</apex:selectList>
</apex:outputPanel>
</apex:outputPanel>
</apex:outputPanel>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form> 
</apex:page>



public class Dependentpicklist{
   public string selectCountry{set;get;}
   public string selectState{set;get;}
   public string selectDistrict{set;get;}
   public string selectVillage{set;get;}
   public List<Selectoption> Options{set;get;}
   public List<Selectoption> StateOptions{set;get;}
   public List<selectoption> DistrictOptions{set;get;}
   public List<selectoption> VillageOptions{set;get;}
   
   
   public Dependentpicklist(){
       Options = new List<Selectoption>();
           for(Country__c cou:[select Id,Name from Country__c]){
              Options.add(new Selectoption(cou.Id,cou.Name));
           }
   }
   public void FetchState(){
      StateOptions = new List<Selectoption>();
          for(State__c st:[select Id,Name from State__c where Country__c =:selectCountry]){
              StateOptions.add(new Selectoption(st.Id,st.Name));
          } 
   }
   public void FetchDistrict(){
       DistrictOptions = new List<Selectoption>();
           for(District__c dis:[select Id,Name from District__c where State__c =:selectState]){
               DistrictOptions.add(new Selectoption(dis.Id,dis.Name));
           }
   }
   public void FetchVillage(){
       VillageOptions = new List<Selectoption>();
           for(Village__c vlg:[select Id,Name from Village__c where District__c =:selectDistrict]){
               VillageOptions.add(new Selectoption(vlg.Id,vlg.Name));
           }
   }
}

if i select country before will be display NONE value .then if you select any country then automatically displays the states,districts,villages