You need to sign in to do that
Don't have an account?
Shrey Tyagi
Unable to Pass VF Page picklist value to apex method.
Hi All ,
I have a section in vf pages that pass 2 values to apex method upon click of a link.
VF Page Code:
<table cellpadding="2" cellspacing="2">
<tr>
// //This value gets passed over as null
<td style="font-weight:bold;">Document Type<br/>
<select id="DocTypeOnBase" value="{!searchDocType}">
<option value=""></option>
<apex:repeat value="{!DocTypeValues}" var="DocTypeValue">
<option value="{!DocTypeValue}">{!DocTypeValue}</option>
</apex:repeat>
</select>
</td>
</tr>
<tr>
// //This value gets passed over successfully
<td style="font-weight:bold;">Document Text<br/><br></br>
<apex:inputtext value="{!searchText}" id="DocumentText" rendered="true" />
</td>
</tr>
<tr>
<td><br/>
<apex:commandlink action="{!processLinkClick}" target="_blank" ><b>Search OnBase</b></apex:commandlink>
</td>
</tr>
</table>
Apex Class:
public string searchText{get;set;}-- This one works
public string searchDocType{get;set;}-- This one passes null
public PageReference processLinkClick() {
return new PageReference('https://onbasetest.rti.org/AppNet/docpop/docpop.aspclienttype=activex&cqid=196&fts='+searchText+searchDocType);
}
I have a section in vf pages that pass 2 values to apex method upon click of a link.
VF Page Code:
<table cellpadding="2" cellspacing="2">
<tr>
// //This value gets passed over as null
<td style="font-weight:bold;">Document Type<br/>
<select id="DocTypeOnBase" value="{!searchDocType}">
<option value=""></option>
<apex:repeat value="{!DocTypeValues}" var="DocTypeValue">
<option value="{!DocTypeValue}">{!DocTypeValue}</option>
</apex:repeat>
</select>
</td>
</tr>
<tr>
// //This value gets passed over successfully
<td style="font-weight:bold;">Document Text<br/><br></br>
<apex:inputtext value="{!searchText}" id="DocumentText" rendered="true" />
</td>
</tr>
<tr>
<td><br/>
<apex:commandlink action="{!processLinkClick}" target="_blank" ><b>Search OnBase</b></apex:commandlink>
</td>
</tr>
</table>
Apex Class:
public string searchText{get;set;}-- This one works
public string searchDocType{get;set;}-- This one passes null
public PageReference processLinkClick() {
return new PageReference('https://onbasetest.rti.org/AppNet/docpop/docpop.aspclienttype=activex&cqid=196&fts='+searchText+searchDocType);
}
Try the below code , It is working for me. I am able to pass the selected picklist value to controller class but I did not check for the search Text as u mentioned it is working for you.
I saw a few posts here where people are enquiring about integrating Salesforce and OnBase. We provide a pre-packaged solution to seamlessly integrate OnBase with Salesforce. This is built on the OnBase SDK and the force.com platform and allows users to view, link, archive, search AND exchange documents, forms, case objects and data between OnBase and ANY Salesforce object. Check us out if you're looking to solve this problem!
https://www.mtssoftwaresolutions.com/resources/videos/maximize-salesforce-onbase-2019-08-29