• Naresh Kumar 7
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 2
    Replies
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;
        }
       
    </script>
   
    <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:actionFunction>
       
        <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())"/>
         </apex:panelGrid>       
        </apex:outputPanel>
   </apex:form>
</apex:page>

Regards,
Vijosh
  • April 04, 2014
  • Like
  • 0