You need to sign in to do that
Don't have an account?
L037242283804838405
transert input field
hi guys,
how can i transfer input field to the controller by clicking on button
i tried that
<apex:inputField value="{!customer.Name}"/>
<apex:commandButton action="{!getCustomer1}" value="find">
<apex:param name="Mahavir"
value={!customer.Name}
/>
controller function:
public PageReference getCustomer1() {
String a=System.currentPageReference().getParameters().get('Mahavir');
customer=
[SELECT Name, address__c, full_name__c FROM Customer__c WHERE Name =: a];
return (new ApexPages.StandardController(customer)).view();
}
its not working :(
what should i do its urgent thanks for fast answer
how can i transfer input field to the controller by clicking on button
i tried that
<apex:inputField value="{!customer.Name}"/>
<apex:commandButton action="{!getCustomer1}" value="find">
<apex:param name="Mahavir"
value={!customer.Name}
/>
controller function:
public PageReference getCustomer1() {
String a=System.currentPageReference().getParameters().get('Mahavir');
customer=
[SELECT Name, address__c, full_name__c FROM Customer__c WHERE Name =: a];
return (new ApexPages.StandardController(customer)).view();
}
its not working :(
what should i do its urgent thanks for fast answer
If not....you don't neccearily need a param on the button.....create one in the controller and then reference on your page. So in the controller under the class declaration do
public string customerName{get;set;}
Then on the page do: <apex:inputText value="{!customerName}"/>
Then for your query: ..... Where Name = :customerName.....