+ Start a Discussion
prakash chaudharyprakash chaudhary 

plzzzzzzz solve it

public Double goalYearValue {get;set;}

 

Whenever I write the above line that what it means & from where it access the value ?

Initially it call set property or get property ?

If I write this line then how I can pass my values in this ?

How to connect my page & controller to bean so that my data will flow very well...

Please give me simple example about flow & execution.

 

RaumilRaumil

Hello,

 

Hope the link provided will explain you what are getter and setter methods in salesforce and how they are useful

 

http://www.forcetree.com/2009/07/getter-and-setter-methods-what-are-they.html

 

Hope this helps

 

Raumil Setalwad

 

bob_buzzardbob_buzzard

You would pass values to this simply using the property name.

 

E.g. to set a value:

 

goalYearValue=10.0;

 and to extract the value:

 

Double val=goalYearValue;

 

If you want to use this in a visualforce page, assuming it is accessible from the controller, you'd again simply use the name:

 

<apex:inputText value="{!goalYearValue}"/>

<apex:outputText value="{!goalYearValue}"/>

 if this is stored in another class (maybe your bean), you'd simply prefix it with the property that contains the bean.

prakash chaudharyprakash chaudhary

Thnx Bob,

As I got,

VFPage --> Controller --> Bean

means the page accept valeus through controller & controller accpets valus from bean.

 

Suppose I want to enter username from VFPage & want to store that value in bean so how can i do that ?

bob_buzzardbob_buzzard

Presumably your controller has a reference to the bean?

 

E.g. a property similar to :

 

public Bean myBean {get; set;}

 You would just use the dotted notation to navigate through to the bean value:

 

<apex:inputText value="{!myBean.goalYearValue}"/>

and this binds the input to the goalYearValue property on your bean that is stored in the controller. 

 

prakash chaudharyprakash chaudhary

goalAssetMappingBeanList.add(0,mappingBean);

wht above code is doing ?

bob_buzzardbob_buzzard

Its adding the mappingBean to the list at position zero - effectively making it the first item in the list.

prakash chaudharyprakash chaudhary

Please tell me that,

I have one custom field named Allocation__c [Number(16, 2)] of custom object GoalAssetAssociation.

& Another custom field named allocated__c [Roll-Up Summary (SUM GoalAssetAssociation)] of custom object Asset.

 

Please tell me what is the relation between them.

& I have putted field named allocated__c in GoalAssetAssociation__c but while using query it is telling me that this field is as unknown field. Why ?

bob_buzzardbob_buzzard

This implies that Asset is on the master side of a master/detail relationshhip with GoalAssetAssociation, so you can create roll up fields that give the total/min/max etc of the detail (GoalAssetAssociation) object.

 

If the compiler says that a field is unknown, that means you've used a field that doesn't exist in your SOQL.