• Sandy singh
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 26
    Questions
  • 10
    Replies

Hi,

 

can anyone help me why save or back button not working with use of Map 'groupNameAndOptionMap' which return value as List <SelectOption>(red colour code). Same code working if using List<SelectOption>..

 

Below are the code:

 

<apex:commandButton Value="Save" action="{!saveData}"  rerender="pageBlockId" style="float:right" />
<apex:commandButton value="Back to Home" action="{!navigateBack}" style="float:right" />
<apex:variable var="sameCategory" value=""/>
<apex:pageblockTable value="{!studentList}" var=std >
    <apex:column width="5%" >
         <apex:facet name="header">Name</apex:facet>
         <apex:outputText value="{!std .name__}"  />
        <apex:variable var="sameCategory" value="{!std.category_name__c}" />
    </apex:column>
  
 <apex:column headerValue="Student Selection">
    <apex:selectList value="{!std.student_selection__c}" title="Choose a Section" id="listId" size="1">
        <apex:selectOptions value="{!groupNameAndOptionMap[sameGroup]}" />
    </apex:selectList>
 </apex:column>
</apex:pageblockTable >

 

 

Thanks in advance

 Sandy

 

Hi All,

 

 Command Link button is not working for me. Below is my code:

VisualForce Code:  
  
<apex:pageblockTable value="{!request}" var="request"  width="100%"   rendered="{!request.size > 0}">
     <apex:column width="20%">
      <apex:facet name="header">Action</apex:facet>
      <apex:commandLink action="{!deleteSelectedRecord}" value="Delete" >
      <apex:param name="selectActionLink" value="{!request.Id}" assignTo="{!selectActionLink}"/>  
      </apex:commandLink>
                   	    
     <apex:outputText value="|" />
     <apex:commandLink action="{!holdRecord}" value="Hold/Release"  reRender="block">
     <apex:param name="selectActionLink" value="{!request.Id}" assignTo="{!selectActionLink}"/>
     <apex:param name="holdReleseFlag" value="True" assignTo="{!holdReleseFlag}"/> 
     </apex:commandLink> 
     </apex:column>
     <apex:column value="{!request.rank__c}"  width="5%" headerValue="Rank"/>
    </apex:pageblockTable>
-----------------------------------------------------------	
	
Controller Code:
 public Pagereference deleteSelectedRecord(){
  PageReference newPage = new PageReference('/apex/PgaeOne');
  newPage.setRedirect(true);
  return newPage;
  }

 Please look this and help me.

 

Thanks in advance.

 

Regards,

Sandy

 

Hi All,

 

 I have Two tabs tab1 & tab2, on click of tab1 its display all the records with edit & delete option, here i had overrided edit function so that on click of edit it open one page, but problem is here once user cilck on edit its highlight tab2 not tab1.

 I am not sure what worg i am doing...

 

If any one have idea about this please help me out.

 

Regards,

Sandy

Hi,

 I have 2 buttons one is previous & other is submit on same visualforce page and its contain multiples fields, on hit of Enter button its invoke submit  not previous button. In my case below code invoke submit button only once hit enter button for filed

 of  " <apex:inputField value="{!account.age}" required="true" id="provider" onkeypress="return noenter(event);"/>"   

Once onfocus go to next filed this doesn't work.

 

Code:

<apex:page>
<script>
function noenter(ev)  {
        if (window.event && window.event.keyCode == 13 || ev.which == 13)
         {
            var ele=document.getElementById('{!$Component.pifBioForm.pifPageBlock.a.b}');
            ele.click();
            return false;
         }
         else
         {
            return true;
         }
          }
</script>

<apex:form id="pifBioForm"  >
        
        <apex:pageBlock title="My Details" id="pifPageBlock">  
            Fields marked with (<B><font color="red">|</font></B>) are required. <br />
            <apex:pageMessages escape="false" />

            <apex:pageBlockButtons id="a">
                <apex:commandButton id="c" action="{!pifTripPageTwo}"  value="Previous" / >&nbsp;&nbsp;&nbsp;
             <apex:commandButton id="b" action="{!validateDateExpiry}" value="Submit" /> 
            </apex:pageBlockButtons>

<apex:pageBlockSection>
 <apex:pageBlockSectionItem id="p">
                    <apex:outputLabel value="Name Provider" />
                    <apex:inputField value="{!account.age}" required="true" id="provider" onkeypress="return noenter(event);"/>
                </apex:pageBlockSectionItem>

                <apex:pageBlockSectionItem id="groupSecItem">
                    <apex:outputLabel value="Ph Number" />
                    <apex:inputField value="{!account.phnumber__c}" id="phnumber" />
                </apex:pageBlockSectionItem>

</apex:page>

 

Please help me on this.

 

Thanks ,

Sandy

Hi ,

 

I am getting Error:"Account Name: Account: bad field names on insert/update call: Name" once trying to update Account object from apex Controller.

 

Apex Code:

public class sampleController{

public Account acc = new Account();

 

public PageReference save(){

acc.PersonMailingStreet = 'bangalore';

acc.PersonMailingCity = 'abc';

update acc ;

return null;

}

}

 

can anyone help me on this.

 

Thanks in advance,

Sandy

Hi All,

 

 I have requirement to get 'tab URL' at run times once user click on Tab->click on go than we will get url : "https://cs12.salesforce.com/a16?fcf=00BV0000000Pe1h" .

 

Here i need "a16?fcf=00BV0000000Pe1h"  value to add on custom button javascript function call and this value is differ from one tab to another tab.

 

So can anyone help me how to get it.

 

Thanks in advance,

Sandy

 

Hi All,

 

On click of employee tab it  display all records with action link edit,delete with checkbox option, so i want to be add "view" link ,  so that on click of "view" link i can able to redirect some visualforce page with "same record id" which work for edit & delete. 

 

Thanks in advance,

Sandy

 

 

Hi All,

 

I am getting stranger error once I used equals method,

 

Code:

String selectedProgramName = 'abc';

for(Integer i=0;i<sample.size();i++) {

 if(sample[i].trim().equals(selectedProgramName)) {

 blnAddr = true;

 break;

}}

Error Message:

java.lang.AssertionError: apex.bytecodeinterpreter.InterpreterRuntimeException: Unable to resolve method reference: com/salesforce/api/String.equals(java/lang/String, java/lang/String) 

 

 

So can any one let me know region for this.

 

Thanks in advance,

Sandy

 

 

 Hi All,

 

   I have problem with date format , once user has entered date '01/18/2012'  through visualforce page and if again trying to view it on some other visualforce page its display as "Wed Jan 18 00:00:00 GMT 2012". I need to view it on same way which user has entered.

 Can any one help me if any global setting is possible in salesforce so that all date field should be same which user has entered.

 

Thanks in advance,

Sandy

 

 

Hi all,

 

I have one junction object EmpDepartment which link with Employee and Department object and on click of stranded delete button it will delete record from all three object (EmpDepartment, Employee ,Department ).

 

 

Can any one help me on this requirement.

 

Thanks in advance,

Sandy

 

 



Hi,

 

I have one visualforce page and in this page i want to add left panel, on this panel i want to create command link.

So, can anyone give some idea on this.

 

Thanks in advance,

Sandy

Hi All,

 I have to set default value of radio button based on condtion which comes from controller. sample code is below:

 

Visual force page:

<apex:pageBlockSection >

<input type="radio" name="triptype" id="triptype" value='{!selectedValue1}' checeked = '{!selectedValue1 != null}'

onclick="tripSelection(this.value)" />test1<br/>

 

<input type="radio" name="triptype" id="triptype" value='{!selectedValue2}' checeked = '{!selectedValue2 != null}'
 onclick="tripSelection(this.value)" />test2<br/>

</apex:pageBlockSection >

 

Apex Code:

public class testClass{

   public  testClass(){

      if(cond){ selectedValue1 = 'abc'}

     else{ selectedValue1= 'xyz'}

    } }

 

Please help me to resolve this requirement.

 

Thanks,

Sandy

 Hi All,

 

I have multiple radio buttons(radio1,radio2,radio3..) in same group and name of radio button comes from object, on click of red1

i want to dispaly some information related to radio1 button just between radio1 & radio2. same way if click radio2 than related information comes between radio2 & radio3.

 

Please can anyone tell me how to do this.

 

 

Regards,

Sandy

 

Hi All,

 

Can any body tell me how can we hide & show block of section without using span or div tag in visualForce.

 

Thanks in advance.

 

Regards,

Sandy

Hi All,

 

Can any one tell me how to hide selectList based on condition if countries contain list value then show pickList else hide, below is my code:

 

VisualForce Code:

 <apex:outputText id="subTrip" rendered="{!countries.size >= 0}" >
     <apex:selectList id="list" value="{!country}" size="1">
    <apex:selectOptions value="{!countries}"  />
  </apex:selectList>
  </apex:outputText>

 

Controller Code:

public String country {get;set;}

public List<SelectOption> getCountries() {
            List<SelectOption> optetions = new List<SelectOption>();
            List<Country__c> items = [select Name,Id from Country__c where Id    =:selectedId ];
            for(Country__c c : items){
            options.add(new SelectOption(c.Id,c.Name));
                                    
           }

 

Thanks in Advance,

 

Regards,

Sandy

Hi All,

 

 On selectRadio Button selected value want to be access in apex class controller.

 

Apex Code:

<apex:page controller="SelectRadioController">
<apex:form >
<apex:pageBlock >
<apex:selectRadio id="slctRd" dir="ltr" required="true" layout="pageDirection" value="{!selectedValue}" immediate="true">
<apex:selectOptions id="selRdOptn" value="{!Options}"/>
</apex:selectRadio>
<apex:outputText id="test" value="{!test}"></apex:outputText>
</apex:pageBlock>
</apex:form>
</apex:page>

 

controller Class:

public with sharing class SelectRadioController {
    
    public String selectedValue {get; set;}
    public List<SelectOption> Options {get; set;}
    
    public SelectRadioController() {
        Options = new List<SelectOption>();
        Options.add(new SelectOption('test1', 'test1'));
        Options.add(new SelectOption('test2', 'test2'));
        Options.add(new SelectOption('test3', 'test3'));
    }
    
   public String test{
     set{}
     get{
     test = 'Hello World' + selectedValue  ;
      return test;
     }
    }   
}

 

Here i want to display test filed on visualforce page, but this code is not working.

Can any one help me on this.

 

Thanks in Advance.

 

Ragards,

Sandesh

 

Hi all,

 

I want display warning message on filed level [Requirement: if date field is less then current date show warning message  on that filed and allow user to enter the data].

 

Please help me on this issue.

 

Regards,

Sandy

Hi All,

 

 I need to access address variable in visual force page, so that if address is have some value its display as output text &

if it has null value in controller it display blank as a input textArea field in visual page. My Controller is below.

 

class myController {

public myController(){this.address='my address' ;}

public String address{ set(this.address=address;}

get(

if(address!=null)  return address ; else{address=null; return address;}

}

}

 

Please help me on this requirement. 

 

Thanks in advance,

Sandy

 

Hi All,

 

  How can i will get custom object data on our exsiting form from Custom object, so user doesn’t have refill all the fields again.

 

Regards,

Sandesh

Hi All,

 

I have requirement like:

"In one screen have multiple section and each section have multiple fileds. I want to develop mockUp

for this, which show all section with required filed using clude based flow designer"

 

Can any one help me how to resolve this problem using visual workflow cloud based flow designer.

 

Thank in Advance,

Sandy

Hi,

 

can anyone help me why save or back button not working with use of Map 'groupNameAndOptionMap' which return value as List <SelectOption>(red colour code). Same code working if using List<SelectOption>..

 

Below are the code:

 

<apex:commandButton Value="Save" action="{!saveData}"  rerender="pageBlockId" style="float:right" />
<apex:commandButton value="Back to Home" action="{!navigateBack}" style="float:right" />
<apex:variable var="sameCategory" value=""/>
<apex:pageblockTable value="{!studentList}" var=std >
    <apex:column width="5%" >
         <apex:facet name="header">Name</apex:facet>
         <apex:outputText value="{!std .name__}"  />
        <apex:variable var="sameCategory" value="{!std.category_name__c}" />
    </apex:column>
  
 <apex:column headerValue="Student Selection">
    <apex:selectList value="{!std.student_selection__c}" title="Choose a Section" id="listId" size="1">
        <apex:selectOptions value="{!groupNameAndOptionMap[sameGroup]}" />
    </apex:selectList>
 </apex:column>
</apex:pageblockTable >

 

 

Thanks in advance

 Sandy

 

Hi All,

 

 I have Two tabs tab1 & tab2, on click of tab1 its display all the records with edit & delete option, here i had overrided edit function so that on click of edit it open one page, but problem is here once user cilck on edit its highlight tab2 not tab1.

 I am not sure what worg i am doing...

 

If any one have idea about this please help me out.

 

Regards,

Sandy

Hi All,

 

I am getting stranger error once I used equals method,

 

Code:

String selectedProgramName = 'abc';

for(Integer i=0;i<sample.size();i++) {

 if(sample[i].trim().equals(selectedProgramName)) {

 blnAddr = true;

 break;

}}

Error Message:

java.lang.AssertionError: apex.bytecodeinterpreter.InterpreterRuntimeException: Unable to resolve method reference: com/salesforce/api/String.equals(java/lang/String, java/lang/String) 

 

 

So can any one let me know region for this.

 

Thanks in advance,

Sandy

 

 

Hi all,

 

I have one junction object EmpDepartment which link with Employee and Department object and on click of stranded delete button it will delete record from all three object (EmpDepartment, Employee ,Department ).

 

 

Can any one help me on this requirement.

 

Thanks in advance,

Sandy

 

 



Hi All,

 

Can any one tell me how to hide selectList based on condition if countries contain list value then show pickList else hide, below is my code:

 

VisualForce Code:

 <apex:outputText id="subTrip" rendered="{!countries.size >= 0}" >
     <apex:selectList id="list" value="{!country}" size="1">
    <apex:selectOptions value="{!countries}"  />
  </apex:selectList>
  </apex:outputText>

 

Controller Code:

public String country {get;set;}

public List<SelectOption> getCountries() {
            List<SelectOption> optetions = new List<SelectOption>();
            List<Country__c> items = [select Name,Id from Country__c where Id    =:selectedId ];
            for(Country__c c : items){
            options.add(new SelectOption(c.Id,c.Name));
                                    
           }

 

Thanks in Advance,

 

Regards,

Sandy

Hi All,

 

 On selectRadio Button selected value want to be access in apex class controller.

 

Apex Code:

<apex:page controller="SelectRadioController">
<apex:form >
<apex:pageBlock >
<apex:selectRadio id="slctRd" dir="ltr" required="true" layout="pageDirection" value="{!selectedValue}" immediate="true">
<apex:selectOptions id="selRdOptn" value="{!Options}"/>
</apex:selectRadio>
<apex:outputText id="test" value="{!test}"></apex:outputText>
</apex:pageBlock>
</apex:form>
</apex:page>

 

controller Class:

public with sharing class SelectRadioController {
    
    public String selectedValue {get; set;}
    public List<SelectOption> Options {get; set;}
    
    public SelectRadioController() {
        Options = new List<SelectOption>();
        Options.add(new SelectOption('test1', 'test1'));
        Options.add(new SelectOption('test2', 'test2'));
        Options.add(new SelectOption('test3', 'test3'));
    }
    
   public String test{
     set{}
     get{
     test = 'Hello World' + selectedValue  ;
      return test;
     }
    }   
}

 

Here i want to display test filed on visualforce page, but this code is not working.

Can any one help me on this.

 

Thanks in Advance.

 

Ragards,

Sandesh

 

Hi all,

 

I want display warning message on filed level [Requirement: if date field is less then current date show warning message  on that filed and allow user to enter the data].

 

Please help me on this issue.

 

Regards,

Sandy

Hi All,

 

 I need to access address variable in visual force page, so that if address is have some value its display as output text &

if it has null value in controller it display blank as a input textArea field in visual page. My Controller is below.

 

class myController {

public myController(){this.address='my address' ;}

public String address{ set(this.address=address;}

get(

if(address!=null)  return address ; else{address=null; return address;}

}

}

 

Please help me on this requirement. 

 

Thanks in advance,

Sandy

 

 Hi All,

 

  I want to use Visual Workflow (Spring 11 release). Can any one let me know where can i get document for this.

 

 

Thanks,

Sandy

Hi,

  

  Anyone have idea

How we include standard layout of objects into visual force pages

and

How to override standard buttons behavior in out of box without custom coding