You need to sign in to do that
Don't have an account?
Syed Aswan 5
Selected value from SelectList is returning null
<apex:outputPanel layout="block" styleClass="requiredBlock"/>
<apex:selectList value="{!VMW_Product}" size="1" required="true" tabindex="70">
<apex:actionSupport event="onchange" reRender="SubStatusRerender"/>
<apex:selectOptions value="{!VMW_Product_values}" >
</apex:selectOptions>
</apex:selectList>
</apex:outputPanel>
---Apex class----
Public String VMW_Product{get;set;}
system.debug('VMW_Product: '+VMW_Product);// Here it has the value 'null'
<apex:selectList value="{!VMW_Product}" size="1" required="true" tabindex="70">
<apex:actionSupport event="onchange" reRender="SubStatusRerender"/>
<apex:selectOptions value="{!VMW_Product_values}" >
</apex:selectOptions>
</apex:selectList>
</apex:outputPanel>
---Apex class----
Public String VMW_Product{get;set;}
system.debug('VMW_Product: '+VMW_Product);// Here it has the value 'null'
All Answers
Ch Nagendra Prasad
Thanks for the reply.
I tried but it is not working, I'm still getting the null value.
Just to clarify the things, I'm not clicking on any button or calling any function after selecting a value fron SelectList.
where VMW_Product is setting with values ? I could not see that in the code u pasted. set the value for that variable either in constructor of the controller or any method (you need to keep that in <apex:page action="{!methodName}")
I believe it is giving issue as it is being set with any value at the time of page load.
let me know, if it helps you or need any help :)
shiva.sfdc.backup@gmail.com
VF page,
Controller,