You need to sign in to do that
Don't have an account?
Force.com
How to set a param value of command button equal to the User Text input ?
Hi,
In visualforce, I am iterating through a wrapper class and for each iteration, a textbox is displayed. My code snippet is:
<apex:repeat value="{!comList}" var="com"> <b>{!com.comment.name} : </b><br/> <apex:inputTextarea id="textbox" value="{!com.reply}" /><br/> <apex:commandButton value="Reply" action="{!replytoComment}" reRender="repeatFrm"> <apex:param name="commentId" value="{!com.comment.id}" assignTo="{!commentId}" /> <apex:param name="replyText" assignTo="{!replyText}" value="{!com.reply}"/> </apex:commandButton> </apex:repeat>
I want to send the user input which is entered in the inputText Box to the controller with the help of "param" called replyText. But when I am clicking on "Reply" command button, replyText param is showing null value.
replyText is of getter setter type.
If somebody had faced such a situation, please help.
Thanks
Hi Charan,
Thanks for quick response. I resolved the problem by using <apex:variable> and passing the index number in the controller.
I modified my visualforce code to
Thanks
All Answers
You could better call a Action fucntion onClick of command button and send these values.
Give a try!!
Hi Charan,
Thanks for quick response. I resolved the problem by using <apex:variable> and passing the index number in the controller.
I modified my visualforce code to
Thanks