function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ssssssss 

how to send object value from apex controller to visualforce input text field

hi all,

 

I have 2 VFpages with three common fileds like SFN number,voyage number,vessel name.Here i dont want re enter the same values in second page.So in the second VF page i can get the value of object from first page through lookup relation for one filed i.e SFN_Number.In lookup relation i can able to get only one value.So i want to get the values of remaing two fields for the corresponding SFN Number.In controller i am checking for the equality of SFN number  of tw pages in query.If i click on the link in second page i want to get the values from controller to input text fileds of second page.Here i am not able to pass the value from controller to particular input filed in second page.So plz tell me how to pass the object value from controller to inputfield of vf page.

 

My sample code is as follows:

controller:

 

public class hbl_validate
{

 private House_Bill_Of_Ladding__c  curr_record =new House_Bill_Of_Ladding__c();

public hbl_validate(ApexPages.StandardController controller)
  {

    this.curr_record=(House_Bill_Of_Ladding__c)controller.getRecord();

   }

   public void getvalues()
  {
    
    string curr_sfn=curr_record.SFN_Number__c;  
    Sea_Foot_Note__c[] SFN_LKUP_VALUE=

       SELECT SFN_Number__c,Vessel_Name__c,Voyage_Number__c   FROM  Sea_Foot_Note__c where SFN_Number__c =: curr_sfn];

 

  //Here i want to send the value of Vessel_Name__c,Voyage_Number__c to the following second page corresponding input fileds .

}

}

 

Vf page

<apex:page standardController="House_Bill_Of_Ladding__c"   extensions="hbl_validate">

<apex:form id="frm" >

<apex:outputLabel value="SFN Control No." />

<apex:inputField id="sfn" value="{!House_Bill_Of_Ladding__c.SFN_Number__c}" />

<apex:outputLabel value="Voyage No." />

<apex:inputField id="vref" value="{!House_Bill_Of_Ladding__c.Voyage_Number__c}" >

<apex:outputLabel value="Vessel Name" />

<apex:inputField id="vessel" value="{!House_Bill_Of_Ladding__c.Vessel_Name__c}" />

<apex:commandLink value="Get"/>

</apex:form>

</apex:page>

 

I have to implement this functionality in many pages.If any one knows plz help me.

 

Thanks in advance,

Manu..