• Naresh Kumar 7
  • 0 Points
  • Member since 2014

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
  • 2
Pleae Reply for my post
How we can post to multiple users by mentioning @ in chatter using Apex.?
How we can make a text field read only (none editable) (Standard field) in salesforce Standard Layout
How we can make a text field read only (none editable) in salesforce
In standard layout.

Can any one plz tell me

how we can compare input field value with String on VF page.
Hi all,

I have created a visualforce  page and wanted to pass current values from feilds of this page to the controller.
The scenario is like, on the screen we have three fields and the user puts in some value to those fields. Now this values entered in the fields should be passed to the variable in the controller. These fields are not binded to any object. 
Now I able to pass the Static value to the controller for eg. <apex:param name="two" value="Vijosh" />. But how to pass Dynamic values from  to the controller.

<apex:page controller="TestFieldPopulationController" id="pg">
    <script type="text/javascript">
        function userInput(){
            var UInput=document.getElementById("{!$Component.pg.frm.in}").value;
            return UInput;
    <apex:form id="frm">
        <apex:actionFunction name="hitMe" action="{!iWantMyJSValues}" rerender="jsvalues">
            <apex:param name="one" value="" />
            <apex:param name="two" value="Vijosh" />
            <apex:param name="three" value="Keyboard" />
        <apex:outputPanel id="jsvalues">
            <apex:panelGrid columns="2">
                Value One:<apex:inputText id="in" value="{!valueOne}"/>
                Value Two:<apex:inputText value="{!valueTwo}" />  
                Value Three:<apex:inputText value="{!valueThree}" />
<apex:commandButton value="Submit" onclick="hitMe(userInput())"/>

  • April 04, 2014
  • Like
  • 0