You need to sign in to do that
Don't have an account?
VRK
apex:selectlist picklist values not performing values
Hi
when select picklist value, based on selection , populate table results...but below code not working, can u pls check is there any wrong in below my code
VF page:
<apex:selectList value="{!statusOptions}" multiselect="false" size="1">
<apex:selectOptions value="{!items}"/>
<apex:actionSupport event="onselect" action="{!poplateResults}" reRender="messageBlock"/>
</apex:selectList>
<apex:actionStatus id="status" startText="requesting..."/>
<apex:pageBlockSection title="Results" id="results" columns="1">
<apex:pageBlockTable value="{!results}" var="c"
rendered="{!NOT(ISNULL(results))}">
<apex:column value="{!c.Type}" />
<apex:column value="{!c.Subject}" />
<apex:column value="{!c.Priority}" />
<apex:column value="{!c.Status}" />
<apex:column value="{!c.CreatedDate}" />
<apex:column value="{!c.Owner.Name}" />
<apex:column value="{!c.SLA_Flag__c}" />
</apex:pageBlockTable>
Controller class ::
------------------------------
public List<SelectOption> getItems() {
List<SelectOption> options = new List<SelectOption>();
options.add(new SelectOption('Admin));
options.add(new SelectOption('Dev'));
options.add(new SelectOption('Suppp'));
options.add(new SelectOption('Test));
return options;
}
public void poplateResults()
{
results = [select CaseNumber,Type, Subject, Priority,Status,CreatedDate,SLA_Flag__c,Owner.Name from Case where Mail_Box_Name__c=:statusOptions];
}
please check is there any wrong in my code ...Thanks
when select picklist value, based on selection , populate table results...but below code not working, can u pls check is there any wrong in below my code
VF page:
<apex:selectList value="{!statusOptions}" multiselect="false" size="1">
<apex:selectOptions value="{!items}"/>
<apex:actionSupport event="onselect" action="{!poplateResults}" reRender="messageBlock"/>
</apex:selectList>
<apex:actionStatus id="status" startText="requesting..."/>
<apex:pageBlockSection title="Results" id="results" columns="1">
<apex:pageBlockTable value="{!results}" var="c"
rendered="{!NOT(ISNULL(results))}">
<apex:column value="{!c.Type}" />
<apex:column value="{!c.Subject}" />
<apex:column value="{!c.Priority}" />
<apex:column value="{!c.Status}" />
<apex:column value="{!c.CreatedDate}" />
<apex:column value="{!c.Owner.Name}" />
<apex:column value="{!c.SLA_Flag__c}" />
</apex:pageBlockTable>
Controller class ::
------------------------------
public List<SelectOption> getItems() {
List<SelectOption> options = new List<SelectOption>();
options.add(new SelectOption('Admin));
options.add(new SelectOption('Dev'));
options.add(new SelectOption('Suppp'));
options.add(new SelectOption('Test));
return options;
}
public void poplateResults()
{
results = [select CaseNumber,Type, Subject, Priority,Status,CreatedDate,SLA_Flag__c,Owner.Name from Case where Mail_Box_Name__c=:statusOptions];
}
please check is there any wrong in my code ...Thanks
Check this code.
Warm Regards,
Nabeel
thanks for your response.........i cant see any modifcations in your copy code .....please let me know what are the changes you did in the code ..Thanks
options.add(new SelectOption('Admin','Admin'));
options.add(new SelectOption('Dev','Dev'));
options.add(new SelectOption('Suppp','Suppp'));
options.add(new SelectOption('Test','Test'));
could you please check is there any other mistakes in the code ..